M_Stob Mathematical Logic Book
-
Upload
oana-florescu -
Category
Documents
-
view
255 -
download
0
Transcript of M_Stob Mathematical Logic Book
-
8/3/2019 M_Stob Mathematical Logic Book
1/193
U n d e r g r a d u a t e L o g i c
M i c h a e l S t o b
A u g u s t 1 6 , 1 9 9 6
-
8/3/2019 M_Stob Mathematical Logic Book
2/193
i i
P r e f a c e
T h e s e n o t e s f o r m t h e t e x t b o o k f o r t h e c o u r s e A d v a n c e d L o g i c ( M a t h e -
m a t i c s 3 8 1 / P h i l o s o p h y 3 8 1 ) t a u g h t a t C a l v i n C o l l e g e . T h e m a i n g o a l o f t h i s
c o u r s e i s t o g i v e a s e l f - c o n t a i n e d i n t r o d u c t i o n t o m a t h e m a t i c a l l o g i c t h r o u g h
t h e c o m p l e t e n e s s a n d i n c o m p l e t e n e s s t h e o r e m s o f G o d e l . A s e c o n d g o a l o f
a l m o s t e q u a l i m p o r t a n c e i s t o d e v e l o p f u r t h e r i n e a c h s t u d e n t t h e a b i l i t y t o
c o n s t r u c t c l e a r a n d c o r r e c t p r o o f s t o m a t h e m a t i c a l p r o p o s i t i o n s . I n c l u d e d a s
a n a i d t o r e a c h i n g t h i s s e c o n d g o a l i s a n a p p e n d i x t h a t d i s c u s s e s t h e p r o c e s s
o f w r i t i n g p r o o f s .
T h e n o t e s a r e n o t s e l f - c o n t a i n e d a n d w e r e n o t i n t e n d e d t o b e s o . F i r s t ,
t h e y a r e m e a n t t o b e a c c o m p a n i e d b y t h e d i a l o g u e t h a t o c c u r s i n t h e c l a s s -
r o o m . T h e l e c t u r e s a n d t h e d i s c u s s i o n s a b o u t t h e p r o b l e m s a r e e s s e n t i a l
i n g r e d i e n t s t o u n d e r s t a n d i n g . S e c o n d , t h e m a t e r i a l c a n n o t b e u n d e r s t o o d
w i t h o u t d o i n g m o s t o f t h e p r o b l e m s t h a t a r e i n c l u d e d . I m p o r t a n t r e s u l t s
a n d t e c h n i q u e s a r e s o m e t i m e s e n c o u n t e r e d f o r t h e r s t t i m e i n t h e p r o b l e m s .
T h e s e n o t e s a r e c e r t a i n l y n o t p o l i s h e d . M i s t a k e s o f a l l s o r t s ( b o t h g r a m -
m a t i c a l a n d m a t h e m a t i c a l ) a b o u n d . I w o u l d b e g r a t e f u l t o t h e r e a d e r f o r
p o i n t i n g o u t t o m e a n y s u c h e r r o r s .
-
8/3/2019 M_Stob Mathematical Logic Book
3/193
C o n t e n t s
I P r e l i m i n a r i e s 1
1 I n t r o d u c t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1
2 M a t h e m a t i c a l I n d u c t i o n : : : : : : : : : : : : : : : : : : : : : 5
3 I n d u c t i v e D e n i t i o n s - F o r m u l a s : : : : : : : : : : : : : : : : : 1 0
4 S t r u c t u r a l I n d u c t i o n : : : : : : : : : : : : : : : : : : : : : : : 1 5
5 A m b i g u i t y : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 9
6 C o u n t a b i l i t y : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 3
7 C o m p u t a b i l i t y : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 7
I I P r o p o s i t i o n a l L o g i c 3 3
1 T r u t h : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3 3
2 T a u t o l o g i c a l C o n s e q u e n c e : : : : : : : : : : : : : : : : : : : : 3 8
3 C o m p a c t n e s s : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 3
4 R e s o l u t i o n : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 4 8
5 R e s o l u t i o n - 2 : : : : : : : : : : : : : : : : : : : : : : : : : : : 5 2
I I I S t r u c t u r e s 5 5
1 W h a t i s a S t r u c t u r e ? : : : : : : : : : : : : : : : : : : : : : : : 5 5
2 O n e B i n a r y R e l a t i o n : : : : : : : : : : : : : : : : : : : : : : : 5 9
3 O n e B i n a r y F u n c t i o n : : : : : : : : : : : : : : : : : : : : : : : 6 4
I V F i r s t - o r d e r L o g i c 6 9
1 T h e l a n g u a g e o f r s t - o r d e r l o g i c : : : : : : : : : : : : : : : : : 6 9
2 W h a t i s T r u t h ? : : : : : : : : : : : : : : : : : : : : : : : : : : 7 5
3 P r o o f s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 8 0
4 L o g i c a l A x i o m s : : : : : : : : : : : : : : : : : : : : : : : : : : 8 4
5 P r o o f s i n A r i t h m e t i c : : : : : : : : : : : : : : : : : : : : : : : 8 7
6 S o m e T h e o r e m s a b o u t P r o o f s : : : : : : : : : : : : : : : : : : 9 2
i i i
-
8/3/2019 M_Stob Mathematical Logic Book
4/193
i v C O N T E N T S
7 C o m p l e t e n e s s : : : : : : : : : : : : : : : : : : : : : : : : : : : 9 7
8 C o m p l e t e n e s s - T h e M o d e l : : : : : : : : : : : : : : : : : : : : 1 0 0
9 E x t e n s i o n s t o t h e C o m p l e t e n e s s T h e o r e m : : : : : : : : : : : : 1 0 3
1 0 A p p l i c a t i o n s o f C o m p l e t e n e s s : : : : : : : : : : : : : : : : : : 1 0 7
V C o m p u t a b i l i t y 1 1 3
1 U n l i m i t e d R e g i s t e r M a c h i n e s : : : : : : : : : : : : : : : : : : : 1 1 3
2 A P l e t h o r a o f U R M - C o m p u t a b l e F u n c t i o n s : : : : : : : : : : : 1 1 7
3 M i n i m a l i z a t i o n a n d t h e r e c u r s i v e f u n c t i o n s : : : : : : : : : : : 1 2 5
4 C h u r c h ' s T h e s i s : : : : : : : : : : : : : : : : : : : : : : : : : : 1 2 7
5 G o d e l - n u m b e r i n g s : : : : : : : : : : : : : : : : : : : : : : : : : 1 3 0
6 T h e U n i v e r s a l M a c h i n e : : : : : : : : : : : : : : : : : : : : : : 1 3 4
7 U n d e c i d a b i l i t y : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 3 8
8 N a t u r a l l y O c c u r i n g U n d e c i d a b l e P r o b l e m s : : : : : : : : : : : 1 4 0
V I I n c o m p l e t e n e s s 1 4 3
1 I s N u m b e r T h e o r y E a s y ? : : : : : : : : : : : : : : : : : : : : : 1 4 3
2 G o d e l ' s I n c o m p l e t e n e s s T h e o r e m : : : : : : : : : : : : : : : : 1 4 8
3 Q a n d N u m e r a b i l i t y : : : : : : : : : : : : : : : : : : : : : : : 1 5 2
4 C o m p u t a b i l i t y a n d B i n u m e r a b i l i t y : : : : : : : : : : : : : : : 1 6 0
5 D i a g o n a l i z a t i o n a n d G o d e l ' s T h e o r e m : : : : : : : : : : : : : : 1 6 3
A W r i t i n g P r o o f s 1 6 5
1 P r o o f s i n M a t h e m a t i c s : : : : : : : : : : : : : : : : : : : : : : 1 6 6
2 W r i t t e n P r o o f s : : : : : : : : : : : : : : : : : : : : : : : : : : 1 6 9
3 P r o v e r b s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 7 1
4 C o n t r a p o s i t i o n a n d C o n t r a d i c t i o n : : : : : : : : : : : : : : : : 1 7 5
5 T e n R u l e s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 7 9
6 F o r m s o f T h e o r e m s : : : : : : : : : : : : : : : : : : : : : : : : 1 8 2
6 . 1 B i c o n d i t i o n a l T h e o r e m s : : : : : : : : : : : : : : : : : 1 8 2
6 . 2 E x i s t e n c e T h e o r e m s : : : : : : : : : : : : : : : : : : : 1 8 2
6 . 3 U n i q u e n e s s : : : : : : : : : : : : : : : : : : : : : : : : 1 8 3
6 . 4 U n i v e r s a l S t a t e m e n t s : : : : : : : : : : : : : : : : : : : 1 8 4
7 S e t s : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1 8 6
-
8/3/2019 M_Stob Mathematical Logic Book
5/193
C h a p t e r I
I n t r o d u c t i o n a n d M a t h e m a t i c a l
P r e l i m i n a r i e s
1 I n t r o d u c t i o n
W e s t a r t w i t h a d e n i t i o n o f m a t h e m a t i c s .
D e n i t i o n 1 . 1 . M a t h e m a t i c s i s t h e p r o v i n g o f p r o p o s i t i o n s a b o u t a b s t r a c t
o b j e c t s .
D e n i t i o n 1 . 1 a n s w e r s t w o q u e s t i o n s a b o u t m a t h e m a t i c s . F i r s t , t h e d e f -
i n i t i o n t e l l s u s w h a t a m a t h e m a t i c i a n s t u d i e s | a b s t r a c t o b j e c t s . S e c o n d ,
t h e d e n i t i o n t e l l s u s t h e m e t h o d t h a t a m a t h e m a t i c i a n u s e s t o c o m e t o
k n o w l e d g e a b o u t t h e s e o b j e c t s | b y p r o o f s . O n e q u e s t i o n a b o u t m a t h e m a t -
i c s l e f t u n a n s w e r e d i n D e n i t i o n 1 . 1 h o w e v e r i s t h e p u r p o s e o f m a t h e m a t i c s .
F o r w h a t p u r p o s e d o w e s e e k t o g a i n k n o w l e d g e a b o u t a b s t r a c t o b j e c t s ?
T h i s i s t h e \ a p p l i c a t i o n s " q u e s t i o n : h o w i s m a t h e m a t i c s a p p l i e d t o t h e \ r e a l
w o r l d ? " O n e a n s w e r t o t h i s q u e s t i o n c a n b e f o u n d i n t h e n o t i o n o f m a t h e -
m a t i c a l m o d e l . T h e a b s t r a c t o b j e c t s o f m a t h e m a t i c s a r e u s u a l l y p r o p o s e d f o r
s t u d y b e c a u s e t h e y a r e t h o u g h t t o p r o v i d e a m o d e l f o r s o m e r e a l - w o r l d p h e -
n o m e n a . F u n c t i o n s o f a s i n g l e r e a l v a r i a b l e m o d e l t h e d a t a i n t h e d y n a m i c s
o f s t r a i g h t - l i n e m o t i o n . A b s t r a c t g r o u p s p r o v i d e m o d e l s f o r t r a n s f o r m a t i o n s
a n d s y m m e t r i e s o f p h y s i c a l o b j e c t s . P r o b a b i l i t y t h e o r y p r o v i d e s a m o d e l f o r
d e a l i n g w i t h s i t u a t i o n s i n v o l v i n g u n c e r t a i n t y .
W i t h t h i s c o n c e p t i o n o f m a t h e m a t i c s i n m i n d , w e a r e n o w i n a p o s i t i o n t o
l o c a t e m a t h e m a t i c a l l o g i c a s a b r a n c h o f m a t h e m a t i c s . M a t h e m a t i c a l l o g i c
1
-
8/3/2019 M_Stob Mathematical Logic Book
6/193
2 C H A P T E R I . P R E L I M I N A R I E S
i s t h e b r a n c h o f m a t h e m a t i c s w h i c h s e e k s t o p r o v i d e a m a t h e m a t i c a l m o d e l
o f m a t h e m a t i c s i t s e l f . T o s e e w h a t t h i s m e a n s , c o n s i d e r t h e d e n i t i o n o f
m a t h e m a t i c s a b o v e . A c e n t r a l p r o b l e m i n u n d e r s t a n d i n g m a t h e m a t i c s i s u n -
d e r s t a n d i n g w h a t c o n s t i t u t e s a p r o o f . I n t h i s c o u r s e w e w i l l e x p e n d m u c h o f
o u r e o r t i n p r o v i d i n g a m a t h e m a t i c a l m o d e l o f p r o o f . T h a t i s , w e w i l l g i v e
a d e n i t i o n o f a n a b s t r a c t o b j e c t , w h i c h w e w i l l a l s o c a l l a p r o o f , w h i c h w e
h o p e w i l l m o d e l t h e m o s t i m p o r t a n t f e a t u r e s o f p r o o f s i n t h e \ r e a l w o r l d " ( i f
o n e c a l l s m a t h e m a t i c s t h e r e a l w o r l d ) . O u r p r i n c i p l e q u e s t i o n s w i l l r e v o l v e
a r o u n d t h e i s s u e o f t h e r e l a t i o n s h i p o f t r u t h t o p r o o f . G o d e l ' s c e l e b r a t e d I n -
c o m p l e t e n e s s T h e o r e m i s a g o o d e x a m p l e o f t h e s o r t o f r e s u l t w e w i l l p r o v e .
T h i s t h e o r e m s a y s , r o u g h l y , t h a t g i v e n a n y \ r e a s o n a b l e " s e t o f a x i o m s f o r
e l e m e n t a r y a r i t h m e t i c , t h e r e i s a t r u e p r o p o s i t i o n o f a r i t h m e t i c f o r w h i c h
t h e r e i s n o d e d u c t i o n f r o m t h o s e a x i o m s . T h a t i s , t h e r e i s a t r u e b u t u n p r o v -
a b l e p r o p o s i t i o n a b o u t t h e n a t u r a l n u m b e r s . W i t h a l l m a t h e m a t i c a l m o d e l s
t h e r e i s t h e q u e s t i o n o f h o w f a i t h f u l t h e m o d e l i s t o t h e p h e n o m e n o n b e i n g
m o d e l e d . A p r o o f i s n o t a n a b s t r a c t o b j e c t a f t e r a l l , i t i s a n a r g u m e n t g i v e n
u s u a l l y i n w o r d s a n d p i c t u r e s b y o n e h u m a n t o a n o t h e r . I t i s a p h e n o m e n o n
w i t h p s y c h o l o g i c a l a n d s o c i o l o g i c a l d i m e n s i o n s . A t t h e e n d o f t h e c o u r s e i t
w i l l b e u p t o y o u t o d e c i d e w h e t h e r t h e a b s t r a c t s y s t e m w e d e v e l o p a c c u r a t e l y
d e s c r i b e s m a t h e m a t i c s .
W e w i l l a c t u a l l y p r o v i d e t w o m o d e l s o f p r o o f . T h e r s t , c a l l e d p r o p o s i -
t i o n a l l o g i c , w i l l t u r n o u t t o b e w o e f u l l y i n a d e q u a t e . T h e n o t i o n o f d e d u c t i o n
i n p r o p o s i t i o n a l l o g i c w i l l n o t m o d e l m u c h o f w h a t w e u n d e r s t a n d a s m a t h -
e m a t i c a l p r o o f . T h e s e c o n d m o d e l , r s t - o r d e r p r e d i c a t e l o g i c , i s a m o d e l
o f p r o o f a d e q u a t e f o r d e s c r i b i n g m u c h ( a n d s o m e s a y a l l ) o f m a t h e m a t i c a l
d i s c o u r s e . W e s t a r t w i t h p r o p o s i t i o n a l l o g i c s i n c e i t i s o l a t e s a n i m p o r t a n t
s u b s y s t e m o f p r e d i c a t e l o g i c a n d a l s o b e c a u s e i t s e r v e s a s a m o d e l f o r s t u d y -
i n g m o r e s o p h i s t i c a t e d a n d c o m p l i c a t e d m o d e l s o f p r o o f .
I n p r o p o s i t i o n a l l o g i c , w e h a v e a m o d e l t h e s o l e p u r p o s e o f w h i c h i s t o
d e s c r i b e t h e w a y m a t h e m a t i c i a n s u s e t h e w o r d s \ a n d , " \ o r , " \ i f - t h e n , " a n d
\ n o t . " T o g r a s p t h e i s s u e s , c o n s i d e r t h e f o l l o w i n g d e d u c t i o n .
I f t h e r i n g R i s l o c a l t h e n i t i s N o e t h e r i a n a n d h a s e x a c t l y o n e m a x i m a l i d e a l .
R i s n o t N o e t h e r i a n .
T h e r e f o r e , R i s n o t l o c a l .
Y o u p r o b a b l y d o n ' t k n o w w h a t a l o c a l r i n g o r a N o e t h e r i a n r i n g i s . Y o u
p r o b a b l y k n o w t h a t a m a x i m a l i d e a l i s a n i d e a l t h a t i s m a x i m a l a m o n g
-
8/3/2019 M_Stob Mathematical Logic Book
7/193
-
8/3/2019 M_Stob Mathematical Logic Book
8/193
4 C H A P T E R I . P R E L I M I N A R I E S
T h i s s y m b o l i z a t i o n c a p t u r e s a l l t h e s t r u c t u r e o f t h e a r g u m e n t .
W e m a k e o n e f u r t h e r r e m a r k . P r o p o s i t i o n s a r e t h e m s e l v e s a b s t r a c t o b -
j e c t s p r o p o s i t i o n s a r e e x p r e s s e d b y E n g l i s h s e n t e n c e s b u t a r e n o t t h e s a m e a s
t h e m . T w o d i e r e n t s e n t e n c e s m i g h t b e u s e d t o e x p r e s s t h e s a m e p r o p o s i t i o n
a n d o n e s e n t e n c e m i g h t e x p r e s s d i e r e n t p r o p o s i t i o n s ( s a y a t d i e r e n t t i m e s ) .
W e w i l l n o t m a k e m u c h o f t h e d i e r e n c e b e t w e e n s e n t e n c e s a n d p r o p o s i t i o n s
i n t h e s e n o t e s .
E x e r c i s e s
1 . C r i t i c i z e D e n i t i o n 1 . 1 . ( F o r i n s t a n c e , a r e t h e r e s o m e t h i n g s t h a t y o u
w o u l d c a l l m a t h e m a t i c s t h a t t h i s d e n i t i o n o m i t s ? A n d a r e t h e r e t h i n g s
t h a t t h e d e n i t i o n c a l l s m a t h e m a t i c s t h a t y o u w o u l d n o t ? )
2 . W h a t q u e s t i o n s m i g h t a m o d e l o f \ p r o o f " t r y t o a n s w e r ?
3 . F i n d a n i n t e r p r e t a t i o n o f P
1
, P
2
a n d P
3
s o t h a t t h e f o r m u l a ( 1 . 1 ) r e p -
r e s e n t s a f a l s e p r o p o s i t i o n .
4 . ( a ) T h e f o l l o w i n g i s a t r u t h t a b l e f o r .
P Q P
Q
T T T
T F F
F T F
F F F
E x p l a i n w h a t e a c h r o w a n d c o l u m n o f t h e t r u t h t a b l e r e p r e s e n t s .
( b ) C o n s t r u c t t r u t h t a b l e s f o r _ , ! , a n d : . S o m e l i n e s o f t h e t a b l e s
a r e l e s s o b v i o u s t h a n o t h e r s | e x p l a i n w h y .
5 . S u p p o s e t h a t P a n d Q a r e s e n t e n c e s . R e p h r a s e e a c h o f t h e f o l l o w i n g
s e n t e n c e s u s i n g t h e w o r d s \ i f " a n d \ t h e n . "
( a ) P o n l y i f Q .
( b ) P w h e n e v e r Q .
( c ) P i m p l i e s Q .
( d ) P i s a n e c e s s a r y c o n d i t i o n f o r Q .
( e ) P i s a s u c i e n t c o n d i t i o n f o r Q .
-
8/3/2019 M_Stob Mathematical Logic Book
9/193
2 . M A T H E M A T I C A L I N D U C T I O N 5
2 M a t h e m a t i c a l I n d u c t i o n
M a t h e m a t i c a l i n d u c t i o n i s a v e r y i m p o r t a n t p r o o f t e c h n i q u e t h a t w e w i l l u s e
o f t e n i n t h e s e n o t e s . L e t N b e t h e s e t f 0 1 2 : : : g o f n a t u r a l n u m b e r s . T h e
p r i n c i p l e o f M a t h e m a t i c a l I n d u c t i o n i s u s e d t o p r o v e s t a t e m e n t s o f t h e f o r m ,
\ F o r a l l n a t u r a l n u m b e r s n : : : . "
T h e o r e m 2 . 1 ( P r i n c i p l e o f M a t h e m a t i c a l I n d u c t i o n ) . S u p p o s e t h a t X
N i s a s e t s a t i s f y i n g
1 . 0 2 X a n d
2 . f o r e v e r y k 2 N , i f k 2 X t h e n k + 1 2 X .
T h e n X = N .
E x a m p l e 2 . 2 . W e u s e m a t h e m a t i c a l i n d u c t i o n t o s h o w t h a t f o r e v e r y n a t -
u r a l n u m b e r n ,
0 + 1 + 2 + + n = n ( n + 1 ) = 2 : ( 2 . 1 )
L e t X b e t h e s e t o f n a t u r a l n u m b e r s f o r w h i c h e q u a t i o n ( 2 . 1 ) i s t r u e . T o
p r o v e t h a t e v e r y n a t u r a l n u m b e r i s i n X w e m u s t p r o v e t w o t h i n g s . F i r s t , w e
m u s t s h o w t h a t 0 2 X t h a t i s , w e m u s t s h o w t h a t ( 2 . 1 ) h o l d s f o r 0 . T h i s i s
t r u e s i n c e 0 = 0 ( 1 ) = 2 . S e c o n d , w e m u s t s h o w t h a t f o r e v e r y n a t u r a l n u m b e r
k , i f k 2 X i s t r u e , t h e n k + 1 2 X i s t r u e . T h a t i s , w e m u s t s h o w t h a t i f
1 + 2 + + k = k ( k + 1 ) = 2 , t h e n 1 + 2 + + ( k + 1 ) = ( k + 1 ) ( k + 1 + 1 ) = 2 .
T o d o t h i s , s u p p o s e t h a t k i s a n i n t e g e r s a t i s f y i n g
1 + 2 + + k = k ( k + 1 ) = 2 ( 2 . 2 )
T h e n
1 + 2 + + ( k + 1 ) = k ( k + 1 ) = 2 + ( k + 1 ) = ( 2 . 3 )
k ( k + 1 ) = 2 + 2 ( k + 1 ) = 2 = ( k + 1 ) ( k + 2 ) = 2 :
B u t e q u a t i o n ( 2 . 3 ) i s t h e e q u a t i o n n e e d e d t o s h o w t h a t k + 1 2 X . T h u s ,
b y t h e P r i n c i p l e o f M a t h e m a t i c a l I n d u c t i o n , X c o n t a i n s a l l n a t u r a l n u m b e r s
a n d s o ( 2 . 1 ) i s t r u e f o r a l l n a t u r a l n u m b e r s .
-
8/3/2019 M_Stob Mathematical Logic Book
10/193
6 C H A P T E R I . P R E L I M I N A R I E S
I n a p r o o f u s i n g T h e o r e m 2 . 1 , t h e s t e p c o r r e s p o n d i n g t o ( 1 ) i s c a l l e d t h e
b a s i s s t e p o f t h e p r o o f a n d t h e s t e p c o r r e s p o n d i n g t o ( 2 ) i s c a l l e d t h e i n d u c t i v e
s t e p . W e w i l l n o t p r o v e T h e o r e m 2 . 1 . I n f a c t t h e r e r e a l l y i s n o w a y t o p r o v e
t h i s T h e o r e m w i t h o u t a s s u m i n g a p r i n c i p l e a t l e a s t a s s t r o n g a s T h e o r e m
2 . 1 . W e d i s c u s s t h i s s i t u a t i o n a t t h e e n d o f t h i s s e c t i o n .
T h e r e a r e s e v e r a l o t h e r f o r m s o f m a t h e m a t i c a l i n d u c t i o n w h i c h a r e f r e -
q u e n t l y u s e d . S u p p o s e f o r i n s t a n c e t h a t w e a r e t r y i n g t o p r o v e a p r o p o s i t i o n
t h a t h o l d s o f a l l b u t n i t e l y i n t e g e r s . I t i s e a s y t o s e e t h a t t h e f o l l o w i n g
p r i n c i p l e i s t r u e a n d u s e f u l i n t h i s s i t u a t i o n .
T h e o r e m 2 . 3 . S u p p o s e t h a t X i s a s e t o f n a t u r a l n u m b e r s a n d c i s a n a t u r a l
n u m b e r s u c h t h a t
1 . c 2 X a n d
2 . F o r a l l k c , i f k 2 X t h e n k + 1 2 X .
T h e n f o r e v e r y n a t u r a l n u m b e r n c , n 2 X .
E x a m p l e 2 . 4 . C o n s i d e r t h e i n e q u a l i t y 2 n
-
8/3/2019 M_Stob Mathematical Logic Book
11/193
2 . M A T H E M A T I C A L I N D U C T I O N 7
t h e f a c t t h a t t h e b a s i s s t e p i s m i s s i n g i s o n l y a n a p p a r e n t s t r e n g t h e n i n g
u s u a l l y t h e p r o o f o f t h e i n d u c t i o n s t e p f o r k = 0 a m o u n t s t o a b a s i s s t e p
a n d m u s t b e h a n d l e d s e p a r a t e l y . T h e o r e m 2 . 5 i s n o t a c t u a l l y s t r o n g e r t h a n
T h e o r e m 2 . 1 h o w e v e r s i n c e i t c a n b e p r o v e d f r o m T h e o r e m 2 . 1 .
E x a m p l e 2 . 6 . T h e F i b o n a c c i s e q u e n c e i s t h e s e q u e n c e f f
n
g o f n a t u r a l n u m -
b e r s d e n e d b y t h e f o l l o w i n g r u l e s .
f
1
= 1 f
2
= 1 f
n
= f
n ; 1
+ f
n ; 2
n
3 :
W e w i l l s h o w t h a t f o r e v e r y n
f
n
=
1
p
5
1 +
p
5
2
!
n
;
1 ;
p
5
2
!
n
!
: ( 2 . 4 )
T h e i n d u c t i o n w i l l u s e t h e T h e o r e m 2 . 5 . B e c a u s e o f t h e w a y t h e F i b o n n a c i
s e q u e n c e i s d e n e d , i t i s i n e v i t a b l e t h a t t h e p r o o f s f o r n = 1 a n d n = 2
w i l l b e d i e r e n t t h a n t h o s e f o r o t h e r n . W e c o u l d t h i n k o f t h i s a r g u m e n t a s
h a v i n g t w o b a s i s s t e p s . F o r t h e s e b a s i s s t e p s , i t i s e a s y t o s e e t h a t ( 2 . 4 ) i s
t r u e f o r n = 1 a n d n = 2 . F o r t h e r e s t o f t h e p r o o f , l e t k 3 b e a n i n t e g e r
s u c h t h a t ( 2 . 3 ) h o l d s f o r a l l n < k . T o s h o w t h a t ( 2 . 3 ) h o l d s f o r n = k , l e t
c = (
1 +
p
5
2
) a n d d = (
1 ;
p
5
2
) . W e m u s t s h o w t h e n t h a t f
k
=
1
p
5
( c
k
;d
k
) .
U s i n g t h e i n d u c t i o n h y p o t h e s i s w e g e t
f
k
= f
k ; 1
+ f
k ; 2
=
1
p
5
( c
k ; 1
; d
k ; 1
) +
1
p
5
( c
k ; 2
; d
k ; 2
)
=
1
p
5
( c
k ; 2
( c + 1 ) ; d
k ; 2
( d + 1 ) )
=
1
p
5
( c
k ; 2
( c
2
) ; d
k ; 2
( d
2
) ) s i n c e c
2
= c + 1 a n d d
2
= d + 1
=
1
p
5
( c
k
; d
k
)
I n t h e s e n o t e s , w e w i l l t a k e m a t h e m a t i c a l i n d u c t i o n t o b e a n a x i o m a b o u t
t h e s e t o f n a t u r a l n u m b e r s a n d s i m p l y a c c e p t t h i s p r i n c i p l e a s t r u e . Y o u c a n
p r o b a b l y c o n v i n c e y o u r s e l f t h a t i t i s b e l i e v a b l e a n d c o n s i s t e n t w i t h y o u r
i n f o r m a l p i c t u r e o f t h e s e t o f n a t u r a l n u m b e r s . M o s t l o g i c i a n s p r e f e r t o t a k e
a n o t h e r p r i n c i p l e a s a n a x i o m f r o m w h i c h m a t h e m a t i c a l i n d u c t i o n c a n b e
p r o v e d .
-
8/3/2019 M_Stob Mathematical Logic Book
12/193
8 C H A P T E R I . P R E L I M I N A R I E S
A x i o m 2 . 7 ( W e l l - O r d e r i n g P r i n c i p l e ) . S u p p o s e t h a t Y i s a n n o n e m p t y
s e t o f n a t u r a l n u m b e r s . T h e n Y h a s a l e a s t e l e m e n t . ( T h a t i s , t h e r e i s a
n a t u r a l n u m b e r n 2 Y s u c h t h a t f o r a l l m 2 Y , n m . )
I n a n e x e r c i s e b e l o w , y o u a r e a s k e d t o s h o w t h a t t h e W e l l - O r d e r i n g P r i n -
c i p l e i m p l i e s t h e P r i n c i p l e o f M a t h e m a t i c a l I n d u c t i o n .
E x e r c i s e s
1 . S h o w t h a t 1
2
+ 2
2
+
+ n
2
=
n ( n + 1 ) ( 2 n + 1 )
6
f o r e v e r y n .
2 . S h o w t h a t
n
X
j = 1
1
j ( j + 1 )
=
n
n + 1
f o r e v e r y n 0 .
3 . F o r w h a t v a l u e s n i s n
2
-
8/3/2019 M_Stob Mathematical Logic Book
13/193
2 . M A T H E M A T I C A L I N D U C T I O N 9
( c ) S h o w t h a t f
n + m + 1
= f
n
f
m
+ f
n + 1
f
m + 1
f o r a l l m n 1 . ( H o l d m
c o n s t a n t a n d u s e i n d u c t i o n o n n . )
8 . P r o v e T h e o r e m 2 . 1 a s s u m i n g T h e o r e m 2 . 5 .
9 . P r o v e T h e o r e m 2 . 5 a s s u m i n g T h e o r e m 2 . 1 .
1 0 . P r o v e T h e o r e m 2 . 1 a s s u m i n g A x i o m 2 . 7 .
1 1 . P r o v e A x i o m 2 . 7 a s s u m i n g T h e o r e m 2 . 1 .
-
8/3/2019 M_Stob Mathematical Logic Book
14/193
1 0 C H A P T E R I . P R E L I M I N A R I E S
3 I n d u c t i v e D e n i t i o n s - F o r m u l a s
I n t h i s s e c t i o n w e g i v e t h e d e n i t i o n o f f o r m u l a o f p r o p o s i t i o n a l l o g i c . F o r -
m u l a s a r e s e q u e n c e s o f s y m b o l s . T h e l i s t o f s y m b o l s i s g i v e n i n t h e f o l l o w i n g
d e n i t i o n .
D e n i t i o n 3 . 1 . T h e s y m b o l s o f p r o p o s i t i o n a l l o g i c c o n s i s t o f
1 . A s e t P V A R =
fP
1
P
2
: : :
go f s y m b o l s c a l l e d ( p r o p o s i t i o n a l ) v a r i a b l e s
2 . T h e s y m b o l s _ : ! $ w h i c h a r e c a l l e d t h e c o n j u n c t i o n , d i s j u n c -
t i o n , n e g a t i o n , i m p l i c a t i o n , a n d b i i m p l i c a t i o n s y m b o l s r e s p e c t i v e l y .
T h e s e s y m b o l s a r e c a l l e d c o n n e c t i v e s y m b o l s
3 . T h e p a r e n t h e s e s ( a n d ) .
W e a r e a s s u m i n g o f c o u r s e t h a t _ : ! $ ( ) P
1
P
2
: : : a r e a l l d i f -
f e r e n t s y m b o l s a n d t h a t n o n e i s a p r o p e r s u b s e q u e n c e o f a n y o f t h e o t h e r s .
F u r t h e r m o r e , P
1
, t h o u g h w e w r i t e i t w i t h t w o d i e r e n t s y m b o l s o f E n g l i s h ,
i s j u s t o n e s y m b o l o f p r o p o s i t i o n a l l o g i c .
D e n i t i o n 3 . 2 . T h e s e t o f f o r m u l a s o f p r o p o s i t i o n a l l o g i c , P R O P , i s d e n e d
a s f o l l o w s .
1 . E v e r y v a r i a b l e i s a f o r m u l a .
2 . I f ' i s a f o r m u l a , t h e n s o i s ( : ' ) .
3 . I f ' a n d a r e f o r m u l a s , t h e n s o a r e
( a ) ( ' ) ,
( b ) ( ' _ ) ,
( c ) ( ' ! ) , a n d
( d ) ( ' $ ) .
4 . N o s e q u e n c e o f s y m b o l s i s a f o r m u l a w h i c h i s n o t r e q u i r e d t o b e b y 1 ,
2 , a n d 3 .
T h i s d e n i t i o n s e e m s s o m e w h a t c i r c u l a r i t a p p e a r s t h a t 2 a n d 3 r e q u i r e
u s t o k n o w a l r e a d y w h a t a f o r m u l a i s i n o r d e r t o d e n e o n e . T h i s d e n i t i o n
i s a n e x a m p l e o f w h a t i s k n o w n a s a n i n d u c t i v e d e n i t i o n . W e s h a l l d i s c u s s
i n d u c t i v e d e n i t i o n s i n g e n e r a l i n a m o m e n t . H o w e v e r w e c a n s e e h o w 2 a n d
3 a r e u s e d b y c o n s i d e r i n g a n e x a m p l e .
-
8/3/2019 M_Stob Mathematical Logic Book
15/193
3 . I N D U C T I V E D E F I N I T I O N S - F O R M U L A S 1 1
E x a m p l e 3 . 3 . W e c l a i m t h a t ( ( : ( P
1
_ P
2
) ) ! P
3
) i s a f o r m u l a . W e c a n
s h o w t h i s b y a l i n e - b y - l i n e p r o o f .
F o r m u l a R e a s o n
1 ) P
1
R u l e 1
2 ) P
2
R u l e 1
3 ) ( P
1
_ P
2
) R u l e 3 b a n d L i n e s 1 , 2
4 ) ( : ( P
1
_ P
2
) ) R u l e 2 a n d L i n e 3
5 ) P
3
R u l e 1
6 ) ( ( : ( P
1
_ P
2
) ) ! P
3
) R u l e 3 c a n d L i n e s 4 , 5
A n o t h e r w a y t o s e e t h i s i s b y t h e t r e e
( ( : ( P
1
_ P
2
) ) ! P
3
)
( : ( P
1
_ P
2
) ) P
3
( P
1
_ P
2
)
P
1
P
2
I n t h i s t r e e , e a c h n o d e i s l a b e l l e d b y a f o r m u l a . T h e l e a v e s a r e l a b e l l e d b y
v a r i a b l e s . E a c h i n t e r i o r n o d e c a n b e s e e n t o b e a f o r m u l a b e c a u s e i t s c h i l d r e n
a r e . T h e r o o t o f t h e t r e e i s l a b e l l e d b y t h e f o r m u l a i n q u e s t i o n .
D e n i t i o n 3 . 2 i s a n e x a m p l e o f w h a t i s k n o w n a s a n i n d u c t i v e d e n i t i o n .
I n a n i n d u c t i v e d e n i t i o n o f a s e t A , w e s p e c i f y w h i c h e l e m e n t s o f a ( l a r g e r )
s e t B a r e i n A b y g i v i n g t w o t y p e s o f r u l e s . O n e t y p e o f r u l e , a b a s i s r u l e ,
s p e c i e s t h a t c e r t a i n e l e m e n t s o f B a r e i n A u n c o n d i t i o n a l l y . I n D e n i t i o n
3 . 2 , p a r t 1 i s s u c h a r u l e . I t s p e c i e s t h a t e a c h v a r i a b l e i s a f o r m u l a . I n t h i s
d e n i t i o n , t h e l a r g e r s e t B i s t h e s e t o f a l l n i t e s e q u e n c e s o f t h e s y m b o l s o f
p r o p o s i t i o n a l l o g i c . T h e s e c o n d s o r t o f r u l e i n a n i n d u c t i v e d e n i t i o n , c a l l e d
a n i n d u c t i v e r u l e , s p e c i e s t h a t a c e r t a i n e l e m e n t ( c a l l e d t h e c o n c l u s i o n o f
t h e r u l e ) i s i n A w h e n e v e r c e r t a i n o t h e r e l e m e n t s ( c a l l e d t h e h y p o t h e s e s o f
t h e r u l e ) a r e i n A . I n D e n i t i o n 3 . 2 , r u l e s 2 a n d 3 a r e i n d u c t i v e r u l e s . R u l e
2 , f o r i n s t a n c e , a s s e r t s t h a t ( : P
1
) i s a f o r m u l a s i n c e w e k n o w t h a t P
1
i s a
-
8/3/2019 M_Stob Mathematical Logic Book
16/193
1 2 C H A P T E R I . P R E L I M I N A R I E S
f o r m u l a b y R u l e 1 . R u l e 4 i n t h e d e n i t i o n o f f o r m u l a l i m i t s f o r m u l a s t o o n l y
t h o s e s t r i n g s o f s y m b o l s r e q u i r e d t o b e f o r m u l a s b y r u l e s 1 , 2 , a n d 3 .
B e f o r e g i v i n g a m o r e p r e c i s e d e n i t i o n o f i n d u c t i v e d e n i t i o n s , w e g i v e
s o m e f u r t h e r e x a m p l e s . T h e f o l l o w i n g d e n i t i o n w i l l b e h e l p f u l .
D e n i t i o n 3 . 4 . A n a l p h a b e t i s a s e t S o f s y m b o l s . A ( n i t e ) s e q u e n c e o f
s y m b o l s s
1
s
2
: : : s
n
f r o m a l p h a b e t S i s c a l l e d a w o r d o r s t r i n g o v e r S . W e l e t
S
i
d e n o t e t h e s e t o f w o r d s o v e r S o f l e n g t h i . W e a l l o w i = 0 w e d e n o t e
t h e e m p t y w o r d b y . W e l e t S E Q ( S ) d e n o t e t h e s e t o f a l l w o r d s o v e r S
S E Q =
1
i = 0
S
i
. S o m e t i m e s S E Q ( S ) i s d e n o t e d b y S
. A l a n g u a g e o v e r S i s
a n y s u b s e t o f S E Q ( S ) .
S o t h e s e t o f f o r m u l a s o f p r o p o s i t i o n a l l o g i c i s a l a n g u a g e o v e r t h e s y m b o l s
o f p r o p o s i t i o n a l l o g i c . W e n o w g i v e s o m e e x a m p l e s o f i n d u c t i v e d e n i t i o n s
o f l a n g u a g e s . F i r s t , w e s e e t h a t S E Q ( S ) i t s e l f h a s a n i n d u c t i v e d e n i t i o n .
D e n i t i o n 3 . 5 . G i v e n a s e t S , t h e s e t S E Q ( S ) i s d e n e d a s f o l l o w s .
1 . T h e e m p t y s e q u e n c e , , i s a n e l e m e n t o f S E Q ( S ) .
2 . I f i s i n S E Q ( S ) a n d x 2 S , t h e n x i s i n S E Q ( S ) .
N o t i c e t h a t i n D e n i t i o n 3 . 5 w e h a v e o m i t t e d t h e a n a l o g u e o f c l a u s e 4
i n t h e d e n i t i o n o f f o r m u l a n a m e l y , w e h a v e n o t e x p l i c i t l y s t a t e d a l i m i t i n g
c o n d i t i o n . W e w i l l a l w a y s a s s u m e t h a t s u c h a c o n d i t i o n i s m e a n t i n a n
i n d u c t i v e d e n i t i o n .
E x a m p l e 3 . 6 . T h e s e t o f a r i t h m e t i c e x p r e s s i o n s , E X P , i s d e n e d a s f o l l o w s .
1 . A n y i n t e g e r c o n s t a n t i s i n E X P .
2 . I f a n d a r e i n E X P , t h e n s o a r e + , ; , ; , , a n d = .
I t i s e a s y t o s e e t h a t 2 + 3 = ; 4 i s i n E X P a c c o r d i n g t o D e n i t i o n 3 . 6 . O n e
p r o p e r t y o f t h e d e n i t i o n o f E X P b e a r s m e n t i o n i n g a t t h i s p o i n t . C o n s i d e r
t h e a r i t h m e t i c e x p r e s s i o n 2 + 3 5 . T h e t w o t r e e s b e l o w s h o w t h a t t h i s
e x p r e s s i o n c a n b e s h o w n t o b e i n E X P i n t w o f u n d a m e n t a l l y d i e r e n t w a y s .
-
8/3/2019 M_Stob Mathematical Logic Book
17/193
3 . I N D U C T I V E D E F I N I T I O N S - F O R M U L A S 1 3
2 + 3 * 5 2 + 3 * 5
2 + 3 5 2 3 * 5
2 3 3 5
I n t h e r s t t r e e , 2 + 3
5 i s s h o w n t o b e i n E X P u s i n g r u l e 2 w i t h 2 + 3 a s
a n d 5 a s . I n t h e s e c o n d t r e e , 2 + 3
5 i s s h o w n t o b e i n E X P b y a p p l y i n g
r u l e 2 o f t h e d e n i t i o n w i t h 2 a s a n d 3 5 a s . T h i s i s r e l a t e d t o t h e f a c t
t h a t 2 + 3 5 i s a m b i g u o u s a s a n a r i t h m e t i c e x p r e s s i o n | s o m e p e o p l e w o u l d
e v a l u a t e i t a s 2 5 ( t h i n k i n g o f t h e e x p r e s s i o n a s b e i n g g e n e r a t e d a s i n t h e r s t
t r e e ) a n d o t h e r s w o u l d c o m p u t e t h e v a l u e o f t h e e x p r e s s i o n a s 1 7 ( w h i c h i s
t h e n a t u r a l v a l u e i f t h e s e c o n d t r e e i s u s e d ) . T h i s a m b i g u i t y i s n o t p r e s e n t
i n o u r d e n i t i o n o f f o r m u l a | t h i s i s t h e p u r p o s e o f p a r e n t h e s e s . W e w i l l
e x a m i n e t h e m a t t e r o f a m b i g u i t y f u r t h e r i n S e c t i o n 5 .
E x a m p l e 3 . 7 . L e t B = S E Q ( f a b c g ) . L e t A B b e t h e s e t d e n e d a s
f o l l o w s .
1 . T h e e m p t y w o r d i s i n A .
2 . I f i s a w o r d i n A t h e n s o a r e a , c , a n d b c .
( H e r e a m e a n s t h e w o r d f o r m e d b y a d j o i n i n g a t o t h e b e g i n n i n g o f a n d
s i m i l a r l y f o r t h e o t h e r c a s e s . )
I t i s e a s y t o s e e t h a t a b b c c c i s a w o r d i n A . I n t h e n e x t s e c t i o n , w e w i l l
s e e h o w t o p r o v e p r o p o s i t i o n s a b o u t i n d u c t i v e s e t s . B u t y o u s h o u l d b e a b l e
t o c o n v i n c e y o u r s e l f t h a t t h e s e t A o f w o r d s d e n e d b y D e n i t i o n 3 . 7 c o n s i s t s
o f a l l w o r d s o f B s u c h t h a t n o c p r e c e d e s a n y b o r a a n d t h e r e a r e a t l e a s t
a s m a n y o c c u r r e n c e s o f c i n a r e t h e r e a r e o f b .
E x e r c i s e s
1 . W r i t e t r e e s t o s h o w t h a t e a c h o f t h e f o l l o w i n g s e q u e n c e s o f s y m b o l s a r e
f o r m u l a s .
( a ) ( ( P
1
! P
2
) _ P
3
)
-
8/3/2019 M_Stob Mathematical Logic Book
18/193
1 4 C H A P T E R I . P R E L I M I N A R I E S
( b ) ( ( ( : P
1
) ! P
2
) _ P
3
)
( c ) ( ( ( P
1
! P
2
) ! P
3
) ! P
4
)
2 . F o r e a c h o f t h e f o l l o w i n g s t r i n g s , a r g u e t h a t i s n o t a f o r m u l a .
( a ) ( P
1
: )
( b ) : P
1
( c ) ( ( P
1
_ P
3
) )
3 . C o n s i d e r t h e f o l l o w i n g i n d u c t i v e d e n i t i o n o f a l a n g u a g e A .
D e n i t i o n 3 . 8 . L e t A S E Q ( f a b g ) b e d e n e d a s f o l l o w s
( a ) T h e e m p t y w o r d i s i n A .
( b ) I f i s i n A t h e n s o a r e a a a n d b b .
C h a r a c t e r i z e t h e w o r d s s u c h t h a t 2 A .
4 . F i n d a l l i n t e g e r s n s u c h t h a t t h e r e i s a f o r m u l a w i t h e x a c t l y n s y m b o l s .
P r o v e y o u r c l a i m . ( Y o u w i l l p r o b a b l y w a n t t o u s e S t r o n g I n d u c t i o n ,
T h e o r e m 2 . 5 . )
5 . P a r t ( b ) o f t h i s p r o b l e m ( f r o m \ G o d e l , E s c h e r , B a c h , " b y H o f s t a d e r )
i s k n o w n a s t h e M U p u z z l e .
D e n i t i o n 3 . 9 . L e t l a n g u a g e , L o n t h e a l p h a b e t S = f M U I g b e
d e n e d a s f o l l o w s .
( a ) M I i s i n L .
( b ) I f M i s i n L , t h e n M i s i n L .
( c ) I f I i s i n L t h e n s o i s I U .
( d ) I f I I I i s i n L , t h e n U i s i n L .
( e ) I f U U i s i n L , t h e n i s i n L .
H e r e a n d d e n o t e a n y s t r i n g s o v e r S .
( a ) S h o w t h a t M U I I U i s i n L .
( b ) ( h a r d e r ) I s M U i n L ?
-
8/3/2019 M_Stob Mathematical Logic Book
19/193
4 . S T R U C T U R A L I N D U C T I O N 1 5
4 S t r u c t u r a l I n d u c t i o n
W e w i l l o f t e n w i s h t o p r o v e t h a t e v e r y e l e m e n t o f s o m e i n d u c t i v e s e t h a s a
p a r t i c u l a r p r o p e r t y . T h e m e t h o d w e w i l l u s u a l l y u s e t o d o t h i s i s s i m i l a r t o
m a t h e m a t i c a l i n d u c t i o n . W e i l l u s t r a t e t h e m e t h o d u s i n g t h e p a r t i c u l a r c a s e
o f f o r m u l a s .
T h e o r e m 4 . 1 . L e t X b e a s e t o f f o r m u l a s . S u p p o s e t h a t
1 . F o r e v e r y v a r i a b l e P , P
2X .
2 . F o r e v e r y f o r m u l a ' , i f ' 2 X , t h e n ( : ' ) 2 X .
3 . F o r a l l f o r m u l a s ' , , i f ' 2 X a n d 2 X t h e n s o a r e
( a ) ( ' ) 2 X ,
( b ) ( ' _ ) 2 X ,
( c ) ( ' ! ) 2 X , a n d
( d ) ( ' $ ) 2 X .
T h e n f o r e v e r y f o r m u l a ' , ' 2 X .
P r o o f . T h e p r o o f i s b y m a t h e m a t i c a l i n d u c t i o n . A s d e s c r i b e d i n t h e l a s t s e c -
t i o n , e v e r y f o r m u l a ' h a s a \ p r o o f " a n i t e s e q u e n c e o f f o r m u l a s '
1
: : : '
n
s u c h t h a t '
n
= ' a n d f o r e a c h f o r m u l a '
i
i n t h e s e q u e n c e , e i t h e r '
i
i s a v a r i -
a b l e , o r '
i
i s a f o r m u l a b y t h e a p p l i c a t i o n o f o n e o f t h e i n d u c t i v e r u l e s w i t h
h y p o t h e s e s a m o n g t h e f o r m u l a s '
1
: : : '
i ; 1
. W e p r o v e t h a t ' 2 X i s t r u e b y
s t r o n g i n d u c t i o n o n t h e l e n g t h , n , o f t h e p r o o f . L e t n b e t h e l e n g t h o f a p r o o f
o f ' a n d s u p p o s e t h a t w e h a v e s h o w n t h a t
2X i s t r u e f o r a l l f o r m u l a s
w i t h p r o o f s o f l e n g t h l e s s t h a n n . C o n s i d e r t h e p r o o f '
1
: : : '
n
= ' o f ' . W e
m a y a s s u m e t h a t ' 2 X f o r a l l i < n s i n c e e a c h s u c h f o r m u l a h a s a p r o o f o f
l e n g t h l e s s t h a n n . N o w t h e r e a r e t w o c a s e s . I f ' i s a v a r i a b l e , ' 2 X b y ( 1 )
o f t h e h y p o t h e s i s . I f ' i s n o t a v a r i a b l e t h e n i t i s a f o r m u l a b y a p p l i c a t i o n o f
o n e o f t h e i n d u c t i v e r u l e s w i t h h y p o t h e s e s a m o n g t h e f o r m u l a s '
1
: : : '
n ; 1
.
B u t i n t h i s c a s e , 2 X f o r e a c h h y p o t h e s i s o f t h e r u l e , s o t h a t ' 2 X b y
( 2 ) o r ( 3 ) a b o v e .
I n a p p l y i n g T h e o r e m 4 . 1 , v e r i f y i n g t h a t ( 1 ) i s t r u e i s c a l l e d t h e b a s i s s t e p
a n d ( 2 ) a n d ( 3 ) a r e c a l l e d i n d u c t i v e s t e p s . W e i l l u s t r a t e t h e u s e o f T h e o r e m
4 . 1 w i t h a n e x a m p l e .
-
8/3/2019 M_Stob Mathematical Logic Book
20/193
1 6 C H A P T E R I . P R E L I M I N A R I E S
T h e o r e m 4 . 2 . L e t ' b e a f o r m u l a . T h e ' h a s t h e s a m e n u m b e r o f l e f t
p a r e n t h e s e s a s r i g h t p a r e n t h e s e s .
P r o o f . F o r f o r m u l a s ' , l e t L ( ' ) a n d R ( ' ) d e n o t e t h e n u m b e r o f l e f t a n d
r i g h t p a r e n t h e s e s o f ' r e s p e c t i v e l y . L e t X b e t h e s e t o f a l l f o r m u l a s s u c h
t h a t L ( ' ) = R ( ' ) . W e w i s h t o s h o w t h a t '
2X f o r e v e r y f o r m u l a ' . T h e
b a s i s s t e p , c o r r e s p o n d i n g t o ( 1 ) o f T h e o r e m 4 . 1 , i s t o s h o w t h a t e v e r y v a r i a b l e
i n i n X . B u t L ( q ) = 0 = R ( q ) f o r a n y v a r i a b l e q . T h e r s t i n d u c t i v e s t e p ,
c o r r e s p o n d i n g t o ( 2 ) o f T h e o r e m 4 . 1 , i s t o s h o w t h a t i f ' 2 X t h e n ( : ' ) 2 X .
S i n c e ' 2 X , L ( ' ) = R ( ' ) . B u t t h e n
L ( ( : ' ) ) = 1 + L ( ' ) = 1 + r ( ' ) = R ( ( : ' ) ) :
T h u s ( : ' ) 2 X . T h e n e x t i n d u c t i v e s t e p , c o r r e s p o n d i n g t o ( 3 ) o f T h e o r e m
4 . 1 , i s t o a s s u m e t h a t ' a n d a r e i n X a n d t o s h o w t h a t s o a r e ( ' ) ,
( ' _ ) , ( ' ! ) a n d ( ' $ ) . W e d o o n l y t h e c a s e o f ( ' ) , t h e r e s t a r e
s i m i l a r . S u p p o s e t h e n t h a t L ( ' ) = R ( ' ) a n d L ( ) = R ( ) . T h e n
L ( ( ' ) ) = 1 + L ( ' ) + L ( ) = 1 + R ( ' ) + R ( ) = R ( ( ' ) ) :
T h u s ( ' ) 2 X .
T h e n e x t T h e o r e m g i v e s a n o t h e r e x a m p l e o f t h i s m e t h o d o f p r o o f a n d
w i l l p l a y a n i m p o r t a n t r o l e i n t h e \ N o n a m b i g u i t y T h e o r e m , " T h e o r e m 5 . 2 .
T h e o r e m 4 . 3 . E v e r y p r o p e r n o n e m p t y i n i t i a l s e g m e n t o f a f o r m u l a o f p r o p o -
s i t i o n a l l o g i c h a s m o r e l e f t p a r e n t h e s e s t h a n r i g h t p a r e n t h e s e s .
P r o o f . L e t X b e t h e s e t o f f o r m u l a s ' f o r w h i c h t h e t h e o r e m i s t r u e n a m e l y
e v e r y p r o p e r n o n e m p t y i n i t i a l s e g m e n t o f ' h a s m o r e l e f t p a r e n t h e s e s t h a t
r i g h t p a r e n t h e s e s . W e w i s h t o s h o w t h a t e v e r y f o r m u l a i s i n X b y u s i n g
s t r u c t u r a l i n d u c t i o n . T h e b a s i s s t e p , t h e c a s e o f v a r i a b l e s , i s t r i v i a l s i n c e
v a r i a b l e s h a v e n o n o n e m p t y , p r o p e r i n i t i a l s e g m e n t s .
F o r t h e r s t i n d u c t i v e s t e p , s u p p o s e t h a t ' i s a f o r m u l a w i t h t h i s p r o p e r t y
a n d c o n s i d e r ( : ' ) . T h e p r o p e r i n i t i a l s e g m e n t s o f ( : ' ) a r e o b v i o u s l y ( , ( : ,
( : u w h e r e u i s a n o n e m p t y p r o p e r i n i t i a l s e g m e n t o f ' , a n d ( : ' . T h e
i n i t i a l s e g m e n t s ( a n d (
:o b v i o u s l y h a v e m o r e l e f t p a r e n t h e s e s t h a n r i g h t
p a r e n t h e s e s . I f u i s a p r o p e r i n i t i a l s e g m e n t o f ' , u h a s m o r e l e f t p a r e n t h e s e s
t h a n r i g h t p a r e n t h e s e s b y t h e i n d u c t i o n h y p o t h e s i s . T h u s , s o d o e s ( : u .
F i n a l l y , ' h a s t h e s a m e n u m b e r o f l e f t a s r i g h t p a r e n t h e s e s b y T h e o r e m 4 . 2
a n d s o ( : ' h a s o n e m o r e l e f t t h a n r i g h t p a r e n t h e s e s .
-
8/3/2019 M_Stob Mathematical Logic Book
21/193
4 . S T R U C T U R A L I N D U C T I O N 1 7
N e x t w e a s s u m e t h a t ' a n d s a t i s f y t h i s p r o p e r t y a n d c o n s i d e r ( ' ) .
T h e p r o p e r i n i t i a l s e g m e n t s o f ( ' ) a r e ( , ( u w h e r e u i s a p r o p e r i n i t i a l
s e g m e n t o f ' , ( ' , ( ' , ( ' v w h e r e v i s a p r o p e r i n i t a l s e g m e n t o f ,
a n d ( ' . T h e s e c a s e s c a n b e h a n d l e d a s i n t h e p r e v i o u s c a s e b y u s i n g
t h e i n d u c t i o n h y p o t h e s i s a n d T h e o r e m 4 . 2 . T h e o t h e r i n d u c t i o n s t e p s a r e
s i m i l a r .
T h e n e x t c o r o l l a r y f o l l o w s i m m e d i a t e l y f r o m t h e p r e v i o u s t w o t h e o r e m s .
C o r o l l a r y 4 . 4 . I f ' i s a f o r m u l a , t h e n n o p r o p e r i n i t i a l s e g m e n t o f ' i s a
f o r m u l a .
T h e g e n e r a l p r i n c i p l e o f s t r u c t u r a l i n d u c t i o n i s t h e f o l l o w i n g T h e o r e m .
T h e o r e m 4 . 5 . L e t S b e a n i n d u c t i v e l y d e n e d s e t a n d l e t X S b e s u c h
t h a t
1 . F o r e v e r y b a s i s r u l e i n t h e d e n i t i o n o f S , i f x i s p l a c e d i n S b y t h a t
b a s i s r u l e , x 2 X .
2 . F o r e v e r y i n d u c t i v e r u l e i n t h e d e n i t i o n o f S , i f e a c h h y p o t h e s i s o f t h e
r u l e i n i n X , a n d x i s t h e c o n c l u s i o n o f t h a t r u l e , t h e n x 2 X .
T h e n X = S .
A s a n o t h e r e x a m p l e o f T h e o r e m 4 . 5 i n a c t i o n , r e c a l l t h a t w e c o n s i d e r e d
t h e f o l l o w i n g i n d u c t i v e d e n i t i o n o f a l a n g u a g e o n t h e a l p h a b e t f a b c g .
D e n i t i o n 4 . 6 . L e t B = f a b c g
. L e t A B b e t h e s e t d e n e d a s f o l l o w s .
1 . T h e e m p t y w o r d i s i n A .
2 . I f i s a w o r d i n A t h e n s o a r e a , c , a n d b c .
W e n o w p r o v e t h e f o l l o w i n g T h e o r e m w h i c h j u s t i e s a c l a i m w e m a d e i n
t h e l a s t s e c t i o n .
T h e o r e m 4 . 7 . L e t A b e t h e l a n g u a g e d e n e d b y D e n i t i o n 4 . 6 . T h e n f o r
e v e r y i n A , h a s a t l e a s t a s m a n y o c c u r r e n c e s o f c a s o f b , a n d i n , n o
o c c u r r e n c e o f c p r e c e d e s a n y o f b o r a .
-
8/3/2019 M_Stob Mathematical Logic Book
22/193
1 8 C H A P T E R I . P R E L I M I N A R I E S
P r o o f . T h e b a s i s s t e p o f t h e p r o o f c o r r e s p o n d s t o 1 o f D e n i t i o n 4 . 6 . I t i s
c l e a r t h a t t h e e m p t y w o r d h a s b o t h o f t h e p r o p e r t i e s m e n t i o n e d . F o r t h e
i n d u c t i v e s t e p s , s u p p o s e t h a t i s a w o r d s a t i s f y i n g t h e t w o p r o p e r t i e s i n
t h e s t a t e m e n t o f t h e T h e o r e m . T h e n w e m u s t s h o w t h a t a , c , a n d b c
d o a s w e l l . W e o n l y c o n s i d e r t h e c a s e o f b c . S i n c e h a s a t l e a s t a s m a n y
o c c u r r e n c e s o f c a s b , s o d o e s b c s i n c e t h i s w o r d h a s o n e m o r e o f e a c h o f
b a n d c t h a n d o e s . F u r t h e r m o r e , n o o c c u r r e n c e o f c i n b c p r e c e d e s a n y
o c c u r r e n c e o f b s i n c e s u c h a c w o u l d h a v e t o p r e c e d e a b i n . S i m i l a r l y , n o
o c c u r r e n c e o f c p r e c e d e s a n y o f a .
W e w i l l n o t p r o v e i t , b u t T h e o r e m 4 . 7 g i v e s a c h a r a c t e r i z a t i o n o f t h e s e t
A d e n e d b y D e n i t i o n 4 . 6 .
E x e r c i s e s
1 . S h o w t h a t e v e r y f o r m u l a c o n s i s t s o f o n l y n i t e l y m a n y s y m b o l s .
2 . L e t c ( ' ) b e t h e n u m b e r o f o c c u r r e n c e s o f b i n a r y c o n n e c t i v e s i n f o r m u l a
' a n d l e t v ( ' ) b e t h e n u m b e r o f o c c u r r e n c e s o f v a r i a b l e s i n ' . S h o w
t h a t c ( ' ) + 1 = v ( ' ) .
3 . L e t a s e t E o f n a t u r a l n u m b e r s b e d e n e d b y t h i s i n d u c t i v e d e n i t i o n
( a ) 0 2 E ,
( b ) I f n 2 E t h e n n + 2 i s i n E .
S h o w t h a t E i s t h e s e t o f e v e n n u m b e r s . F i r s t u s e s t r u c t u r a l i n d u c t i o n
t o s h o w t h a t e v e r y e l e m e n t o f E i s e v e n . T h e n u s e i n d u c t i o n o n N t o
s h o w t h a t i f n i s e v e n , n 2 E .
4 . S o l v e t h e M U p u z z l e o f P r o b l e m 3 - 5 ( b ) b y u s i n g s t r u c t u r a l i n d u c t i o n
t o s h o w t h a t e v e r y w o r d i n t h e l a n g u a g e L h a s a c e r t a i n p r o p e r t y n o t
e n j o y e d b y M U .
5 . G i v e a n i n d u c t i v e d e n i t i o n o f t h e s e t o f \ g o o d " w o r d s o f P r o b l e m
2 { 6 ( b ) .
-
8/3/2019 M_Stob Mathematical Logic Book
23/193
5 . A M B I G U I T Y 1 9
5 A m b i g u i t y
W e n o w t u r n t o t h e q u e s t i o n o f a m b i g u i t y i n a n i n d u c t i v e d e n i t i o n . W e s a w
i n S e c t i o n 3 t h a t D e n i t i o n 3 . 6 o f a r i t h m e t i c e x p r e s s i o n s g a v e r i s e t o a m b i g u -
o u s e x p r e s s i o n s . T h a t i s t h e r e w e r e e x p r e s s i o n s ( 2 + 3 * 5 , f o r e x a m p l e ) w i t h
t w o f u n d a m e n t a l l y d i e r e n t c o n s t r u c t i o n s e q u e n c e s . T h i s a m b i g u i t y l e a d s t o
a n a m b i g u i t y i n i n t e r p r e t a t i o n . W e w a n t t o a r g u e t h a t s u c h a m b i g u i t y i s n o t
p r e s e n t i n t h e d e n i t i o n o f f o r m u l a . W e r s t g i v e a p r e c i s e s t a t e m e n t o f w h a t
i t m e a n s f o r a n i n d u c t i v e d e n i t i o n t o b e u n a m b i g u o u s .
D e n i t i o n 5 . 1 . A n i n d u c t i v e d e n i t i o n o f a s e t S i s u n a m b i g u o u s i f t h e
f o l l o w i n g h o l d .
1 . F o r e a c h e l e m e n t o f S t h e r e i s o n l y o n e r u l e w h i c h p u t s t h e e l e m e n t
i n t o S .
2 . I f t h e e l e m e n t i s p u t i n t o S b y a n i n d u c t i v e r u l e , t h e n t h e r e i s o n l y
o n e s e q u e n c e o f h y p o t h e s e s w h i c h c a n b e u s e d w i t h t h e r u l e t o p u t t h e
e l e m e n t i n t o t h e s e t .
A g o o d w a y o f t h i n k i n g o f D e n i t i o n 5 . 1 i s t h a t a n i n d u c t i v e d e n i t i o n
i s u n a m b i g u o u s i f t h e r e i s e x a c t l y o n e t r e e f o r e a c h o f e l e m e n t o f t h e i n d u c -
t i v e l y d e n e d s e t . N o t e t h a t n o n a m b i g u i t y i s a p r o p e r t y o f t h e i n d u c t i v e
d e n i t i o n a n d n o t o f t h e i n d u c t i v e s e t . A s e t S m a y h a v e b o t h a m b i g u o u s
a n d n o n a m b i g u o u s i n d u c t i v e d e n i t i o n s .
T h e o r e m 5 . 2 . T h e i n d u c t i v e d e n i t i o n D e n i t i o n 3 . 2 i s u n a m b i g u o u s .
P r o o f . W e m u s t e s t a b l i s h t h a t f o r e a c h f o r m u l a t h e r e i s o n l y o n e r u l e t h a t
p u t s i n t o t h e s e t o f f o r m u l a s . F u r t h e r m o r e , i f t h a t r u l e i s a n i n d u c t i v e o n e ,
w e m u s t s h o w t h a t t h e h y p o t h e s e s o f t h e r u l e a r e u n i q u e . F o r t h i s p u r p o s e ,
t h e v a r i o u s c a s e s o f p a r t 3 o f D e n i t i o n 3 . 2 a r e c o n s i d e r e d s e p a r a t e r u l e s .
S u p p o s e t h e n t h a t i s a f o r m u l a . I f i s p u t i n t o t h e s e t o f f o r m u l a s b y ( 1 )
o f D e n i t i o n 3 . 2 , t h e n i s a v a r i a b l e , q . I f i s p u t i n t o t h e s e t o f f o r m u l a s
b y e i t h e r o f t h e o t h e r r u l e s t h e n b e g i n s w i t h ( . T h u s , i f i s p u t i n t o
t h e s e t o f f o r m u l a s b y ( 1 ) , i t i s n o t a l s o p u t i n b y ( 2 ) o r ( 3 ) . N o w i f i s a
f o r m u l a b y ( 2 ) , t h e n s t a r t s w i t h ( : . c a n n o t a l s o b e p u t i n b y a n i n s t a n c e
o f ( 3 ) , s i n c e t h e n w o u l d s t a r t w i t h ( ( o r ( q w h e r e q i s a v a r i a b l e . N o w
i n t h i s c a s e i s o f t h e f o r m ( : ' ) f o r s o m e ' a n d i t i s e a s y t o s e e t h a t ' i s
u n i q u e . F i n a l l y s u p p o s e t h a t i s p u t i n t o t h e s e t o f f o r m u l a s b y a n i n s t a n c e
-
8/3/2019 M_Stob Mathematical Logic Book
24/193
2 0 C H A P T E R I . P R E L I M I N A R I E S
o f ( 3 ) . T h e n h a s t h e f o r m ( C ) w h e r e C i s o n e o f t h e c o n n e c t i v e s , _ ,
! , $ a n d a n d a r e f o r m u l a s . W e s h o w t h a t , , a n d C a r e u n i q u e l y
d e t e r m i n e d t h u s c o m p l e t i n g t h e p r o o f . S u p p o s e t h a t ' = ( C ) = ( D )
w h e r e C a n d D a r e c o n n e c t i v e s a n d , , , a n d a r e f o r m u l a s . W e s h o w
t h a t = , C = D a n d = . T o s e e t h i s n o t i c e t h a t C ) = D ) .
N o w w e a p p l y C o r o l l a r y 4 . 4 t o g e t t h a t n e i t h e r o f a n d i s a p r o p e r i n i t i a l
s e g m e n t o f t h e o t h e r s o t h a t = . T h u s C = D s o t h a t C = D a n d
n a l l y = .
T h e a m b i g u i t y o f D e n i t i o n 3 . 6 o f a r i t h m e t i c e x p r e s s i o n s r e s u l t s f r o m t h e
f a c t t h a t 2 + 3 4 c a n b y p u t i n t o t h e s e t o f a r i t h m e t i c e x p r e s s i o n s u s i n g t h e
i n d u c t i v e r u l e f o r + w i t h h y p o t h e s e s 2 a n d 3
4 o r t h e i n d u c t i v e r u l e f o r
w i t h t h e h y p t h e s e s 2 + 3 a n d 4 .
A n o n a m b i g u o u s i n d u c t i v e d e n i t i o n o f a s e t S a l l o w s u s t o d e n e f u n c -
t i o n s o n S b y s t r u c t u r a l i n d u c t i o n . W e c o n s i d e r a n i m p o r t a n t e x a m p l e i n t h e
n e x t s e c t i o n . H e r e w e g i v e a s i m p l e o n e a n d t h e r e a r e o t h e r s i n t h e e x e r c i s e s .
E x a m p l e 5 . 3 . W e d e n e a f u n c t i o n g w i t h d o m a i n P R O P i n t o N . D e n e g
a s f o l l o w s :
1 . g ( P
i
) = 2
i + 1
.
2 . I f ' i f a f o r m u l a , g ( ( : ' ) ) = 3
g ( ' )
.
3 . I f ' a n d a r e f o r m u l a s t h e n
( a ) g ( ( ' ) ) = 5
g ( ' )
7
g ( )
.
( b ) g ( ( ' _ ) ) = 1 1
g ( ' )
1 3
g ( )
.
( c ) g ( ( ' ! ) ) = 1 7
g ( ' )
1 9
g ( )
.
( d ) g ( ( ' $ ) ) = 2 3
g ( ' )
2 9
g ( )
.
I t i s e a s y t o p r o v e b y i n d u c t i o n t h a t g ( ' ) i s d e n e d f o r e v e r y ' 2 P R O P .
M o r e o v e r , t h e v a l u e o f g ( ' ) i s u n i q u e l y d e t e r m i n e d b y t h i s d e n i t i o n p r e c i s e l y
b e c a u s e t h e d e n i t i o n o f P R O P i s u n a m b i g u o u s . T h a t i s , t h e v a l u e o f g ( ' )
i s d e n e d b y p r e c i s e l y o n e c a s e o f t h e i n d u c t i o n d e n i t i o n .
U n t i l n o w , o u r u n d e r s t a n d i n g o f \ t r e e s " h a s b e e n s o m e w h a t i n f o r m a l . W e
n o w g i v e a p r e c i s e d e n i t i o n o f t h e s o r t o f t r e e s t h a t w i l l b e u s e f u l t o u s .
-
8/3/2019 M_Stob Mathematical Logic Book
25/193
5 . A M B I G U I T Y 2 1
D e n i t i o n 5 . 4 . A ( r o o t e d , l a b e l l e d , o r d e r e d ) t r e e i s a n i t e , n o n e m p t y s e t o f
l a b e l l e d o b j e c t s c a l l e d n o d e s o n e o f w h i c h i s c a l l e d t h e r o o t a n d t h e r e m a i n d e r ,
i f a n y , a r e p a r t i t i o n e d i n t o m 0 s u b t r e e s T
1
, T
2
, : : : , T
m
.
N o t e t h a t D e n i t i o n 5 . 4 i s ( i m p l i c i t l y ) a n i n d u c t i v e d e n i t i o n s i n c e s o m e
t r e e s a r e d e n e d i n t e r m s o f o t h e r s . T h e b a s e c a s e , w e r e i t t o b e m a d e
e x p l i c i t , w o u l d c o r r e s p o n d t o t h e c a s e m = 0 i n t h e d e n i t i o n . T h e b a s i c
t r e e s h a v e o n e l a b e l l e d n o d e a n d t h a t n o d e i s t h e r o o t . T h e w o r d o r d e r e d i n
t h e d e n i t i o n c o r r e s p o n d s t o t h e f a c t t h a t a r o o t w i t h s u b t r e e s S a n d T i s
c o n s i d e r e d a d i e r e n t t r e e t h a n t h a t o f a r o o t w i t h s u b t r e e s T a n d S . W e w i l l
a l w a y s d r a w t r e e s w i t h t h e r o o t a t t o p ( t r e e s g r o w d o w n ) a n d t h e m s u b t r e e s
T
1
, : : : T
m
i f m > 0 b e l o w t h e r o o t f r o m l e f t t o r i g h t w i t h l i n e s e g m e n t s
c o n n e c t i n g t h e r o o t o f T t o t h a t o f e a c h o f t h e T
i
.
W i t h D e n i t i o n 5 . 4 i n h a n d , i t i s e a s y t o s e e h o w t o a s s o c i a t e t r e e s w i t h
e l e m e n t s o f a n i n d u c t i v e s e t . T h e b a s i c r u l e s o f a n i n d u c t i v e d e n i t i o n g e n -
e r a t e t r e e s w i t h o n l y a r o o t a n d t h a t r o o t i s l a b e l l e d b y t h e e l e m e n t o f t h e
i n d u c t i v e s e t p u t i n b y t h a t r u l e . A n i n d u c t i v e r u l e g e n e r a t e s a t r e e w i t h
r o o t c o r r e s p o n d i n g t o t h e e l e m e n t d e n e d , a n d s u b t r e e s c o r r e s p o n d i n g t o t h e
h y p o t h e s e s .
T h e o r e m 5 . 5 . A n i n d u c t i v e d e n i t i o n i s u n a m b i g u o u s i f a n d o n l y i f f o r
e v e r y t w o d i s t i n c t e l e m e n t s o f t h e i n d u c t i v e s e t , t h e t r e e s a s s o c i a t e d w i t h
t h e s e e l e m e n t s a r e u n i q u e .
N o w t h a t w e h a v e e s t a b l i s h e d t h a t p a r e n t h e s e s r e n d e r o u r f o r m u l a s u n a m -
b i g u o u s , w e n o t e t h a t t h e y a l s o m a k e f o r m u l a s h a r d e r t o r e a d . S o w e a d o p t
s o m e c o n v e n t i o n s f o r r e m o v i n g p a r e n t h e s e s . W e s h a l l a s s u m e t h a t t h e p r e c e -
d e n c e o f o p e r a t o r s i s : , , _ , ! , a n d $ i n t h a t o r d e r . T h u s : P
1
_ P
2
P
3
a b b r e v i a t e s ( ( : P
1
) _ ( P
2
P
3
) ) b u t t o a b b r e v i a t e ( ( : P
1
) ( P
2
_ P
3
) ) w e n e e d
p a r e n t h e s e s a s i n : P
1
( P
2
_ P
3
) . N o t e t h a t w e n e v e r n e e d t h e o u t e r m o s t
p a i r o f p a r e n t h e s e s .
E x e r c i s e s
1 . ( a ) I t i s p r e t t y o b v i o u s w h a t t h e s u b f o r m u l a s o f a f o r m u l a ' a r e . G i v e
a p r e c i s e d e n i t i o n . ( H i n t : W h a t y o u a r e d e n i n g i s a f u n c t i o n S
s u c h t h a t S ( ' ) i s a s e t o f f o r m u l a s , n a m e l y t h e s u b f o r m u l a s o f ' .
G i v e t h i s d e n i t i o n b y s t r u c t u r a l i n d u c t i o n . )
-
8/3/2019 M_Stob Mathematical Logic Book
26/193
2 2 C H A P T E R I . P R E L I M I N A R I E S
( b ) I n t h e s a m e w a y , d e n e b y s t r u c t u r a l i n d u c t i o n V ( ' ) , t h e s e t o f
v a r i a b l e s w h i c h o c c u r i n ' .
2 . D e n e a f u n c t i o n h ( T ) b y i n d u c t i o n o n t h e d e n i t i o n o f T , t h a t c o m -
p u t e s t h e h e i g h t o f t h e t r e e T . D r a w s o m e p i c t u r e s r s t t o s e e w h a t a
r e a s o n a b l e n o t i o n i s . T h e h e i g h t o f a t r e e w i t h o n l y o n e n o d e s h o u l d
b e 0 , t h i n k o f r o o t s a s s i t t i n g o n t h e g r o u n d .
3 . L e t g b e t h e f u n c t i o n d e n e d i n E x a m p l e 5 . 3 . T h e n u m b e r n s u c h t h a t
g ( ' ) = n i s c a l l e d t h e G o d e l n u m b e r o f ' .
( a ) C o m p u t e t h e G o d e l n u m b e r o f ( P
1
_ ( : P
2
) ) .
( b ) S h o w t h a t i f ' a n d a r e f o r m u l a s s u c h t h a t g ( ' ) = g ( ) , t h e n
' = . S h o w t h i s b y i n d u c t i o n o n t h e G o d e l n u m b e r o f ' .
-
8/3/2019 M_Stob Mathematical Logic Book
27/193
6 . C O U N T A B I L I T Y 2 3
6 C o u n t a b i l i t y
I n t h i s s e c t i o n w e i n v e s t i g a t e t h e q u e s t i o n o f m e a s u r i n g t h e s i z e o f i n n i t e
s e t s . T h e s i m p l e s t e x a m p l e o f a n i n n i t e s e t i s t h e s e t N o f n a t u r a l n u m b e r s .
W e r s t i n v e s t i g a t e t h e q u e s t i o n o f w h i c h s e t s h a v e t h e s a m e s i z e a s t h a t o f
N . T h e n o t i o n o f s i z e i s m a d e p r e c i s e i n t h e f o l l o w i n g d e n i t i o n .
D e n i t i o n 6 . 1 . A s e t A i s c o u n t a b l y i n n i t e ( o r d e n u m e r a b l e ) i f t h e r e i s a
o n e - t o - o n e c o r r e s p o n d e n c e b e t w e e n A a n d N ( i . e . , t h e r e i s a 1 - 1 f u n c t i o n f
m a p p i n g A o n t o N ) . A s e t A i s c o u n t a b l e i f i t i s n i t e o r c o u n t a b l y i n n i t e .
I f A i s c o u n t a b l y i n n i t e , w e c a n e n u m e r a t e o r l i s t t h e e l e m e n t s o f A i n
a s e q u e n c e a
0
a
1
a
2
: : : w i t h n o r e p e t i t i o n s .
E x a m p l e 6 . 2 . L e t E = f 0 2 4 : : : g , t h e s e t o f e v e n n u m b e r s . E i s c o u n t -
a b l y i n n i t e t h e o n e - t o - o n e c o r r e s p o n d e n c e s e n d s t h e e v e n i n t e g e r 2 n t o
n .
E x a m p l e 6 . 3 . T h e s e t o f s y m b o l s o f p r o p o s i t i o n a l l o g i c i s c o u n t a b l y i n n i t e .
T h i s c a n b e s e e n f r o m t h e f o l l o w i n g e n u m e r a t i o n o f t h e s y m b o l s :
( ) : _ ! $ P
1
P
2
: : :
T h e n e x t t h r e e t h e o r e m s a r e t h e b a s i c t o o l s f o r s h o w i n g m a n y s e t s a r e
c o u n t a b l e .
T h e o r e m 6 . 4 . A s u b s e t o f a c o u n t a b l e s e t i s c o u n t a b l e .
T h e o r e m 6 . 5 . S u p p o s e t h a t A a n d B a r e c o u n t a b l e s e t s . T h e n A B =
f ( a b ) : a 2 A b 2 B g i s c o u n t a b l e .
P r o o f . W e s u p p o s e t h a t b o t h A a n d B a r e i n n i t e . L e t A = f a
0
a
1
a
2
: : : g
a n d B = f b
0
b
1
b
2
: : : g . T h e n t h e f o l l o w i n g f u n c t i o n f g i v e s a o n e - t o - o n e
c o r r e s p o n d e n c e b e t w e e n A B a n d a s u b s e t o f N .
f ( a
n
b
m
) = 2
n
3
m
T h e c o r r e s p o n d e n c e i s o n e - t o - o n e b y t h e u n i q u e n e s s o f t h e p r i n e f a c t o r i z a t i o n
o f a n i n t e g e r . A B i s t h u s c o u n t a b l e b y T h e o r e m 6 . 4 .
A s i m i l a r p r o o f a l l o w s u s t o s h o w t h a t t h e \ c o u n t a b l e u n i o n " o f c o u n t a b l e
s e t s i s c o u n t a b l e .
-
8/3/2019 M_Stob Mathematical Logic Book
28/193
2 4 C H A P T E R I . P R E L I M I N A R I E S
T h e o r e m 6 . 6 . S u p p o s e t h a t f o r e a c h n a t u r a l n u m b e r n , A
n
i s a c o u n t a b l e
s e t . T h e n A =
1
n = 0
A
n
i s c o u n t a b l e .
P r o o f . W e s u p p l y t w o p r o o f s o n e i s a p i c t u r e , t h e o t h e r u s e s t h e s a m e t e c h -
n i q u e a s T h e o r e m 6 . 5 . F o r e a c h n , l e t A
n
= f a
n 0
a
n 1
a
n 2
: : : g . C o n s i d e r
t h e f o l l o w i n g p i c t u r e w h i c h l i s t s a l l t h e e l e m e n t s o f A i n a t w o - d i m e n s i o n a l
a r r a y .
a
4 0
a
3 0
a
2 0
a
1 0
a
0 0
a
2 1
a
1 1
a
0 1
a
1 2
a
0 2
a
0 3
-
;
;
? ;
;
;
;
-
;
;
;
;
;
;
? ;
;
W e m a y e n u m e r a t e A b y s t a r t i n g a t t h e u p p e r - l e f t - h a n d c o r n e r a n d f o l -
l o w i n g t h e a r r o w s .
F o r t h e s e c o n d p r o o f , d e n e f m a p p i n g A o n t o a s u b s e t o f N b y f ( a
n m
) =
2
n + 1
3
m + 1
.
T h e p r e c e d i n g t h e o r e m e n a b l e s u s t o s h o w t h a t s e t s w h i c h l o o k m u c h
\ b i g g e r " t h a n N a r e c o u n t a b l e .
C o r o l l a r y 6 . 7 . T h e s e t Q o f r a t i o n a l n u m b e r s i s c o u n t a b l e .
P r o o f . L e t Z d e n o t e t h e s e t o f i n t e g e r s . P l a i n l y , Z i s c o u n t a b l e . G i v e n a n
e l e m e n t q 2 Q , w e w r i t e q a s a f r a c t i o n i n l o w e s t t e r m s m = n w h e r e m 2 Z
a n d n 2 N . W e n o w d e n e a o n e - t o - o n e c o r r e s p o n d e n c e b e t w e e n Q a n d a
s u b s e t o f Z N b y m a p p i n g q t o ( m n ) . B y T h e o r e m s 6 . 5 a n d 6 . 4 , Q i s
c o u n t a b l e .
-
8/3/2019 M_Stob Mathematical Logic Book
29/193
6 . C O U N T A B I L I T Y 2 5
W e a r e r e a d y t o s h o w t h a t P R O P i s c o u n t a b l e . I n f a c t w e s h o w s o m e t h i n g
s t r o n g e r a n d m o r e u s e f u l .
T h e o r e m 6 . 8 . L e t A b e a c o u n t a b l e s e t . T h e n S E Q ( A ) i s c o u n t a b l y i n n i t e .
P r o o f . L e t A
n
b e t h e s e t o f s t r i n g s o f l e n g t h n . B y T h e o r e m 6 . 6 , w e n e e d
o n l y s h o w t h a t e a c h s e t A
n
i s c o u n t a b l e . T h i s i s d o n e b y i n d u c t i o n o n n .
N o t e t h a t A
0
c o n s i s t s o n l y o f a n d t h a t A
1
i s A . S u p p o s e n o w t h a t n i s
s u c h t h a t A
n
i s c o u n t a b l e . A
n + 1
c a n b e i d e n t i e d w i t h A
n
A i n a n a t u r a l
w a y . T h e r e f o r e A
n + 1
i s c o u n t a b l e a s w e l l b y T h e o r e m 6 . 5 .
N o t a l l s e t s a r e c o u n t a b l e h o w e v e r .
T h e o r e m 6 . 9 . S u p p o s e t h a t A i s a s e t w i t h a t l e a s t t w o e l e m e n t s . T h e s e t
o f i n n i t e s e q u e n c e s o f e l e m e n t s o f A i s u n c o u n t a b l e .
P r o o f . S u p p o s e t o t h e c o n t r a r y t h a t t h e s e t o f i n n i t e s e q u e n c e s o f A i s
c o u n t a b l e . T h e n t h e r e i s a l i s t i n g , s
1
, s
2
, s
3
, : : : o f s e q u e n c e s o f e l e m e n t s o f
A w h i c h i n c l u d e s a l l i n n i t e s e q u e n c e s . L e t t h e e l e m e n t s o f t h e s e q u e n c e s
i
b e l a b e l e d , s
i 1
, s
i 2
, s
i 3
, : : : . C o n t r a r y t o t h e h y p o t h e s i s t h a t t h i s l i s t i n g
c o n t a i n s a l l t h e i n n i t e s e q u e n c e s o f e l e m e n t s o f A w e w i l l p r o d u c e a s e q u e n c e
s t h a t i s n o t i n t h e l i s t . T o n d s
j
, t h e j
t h
e l e m e n t o f s , l e t a 2 A b e a n y
e l e m e n t o f A s u c h t h a t s
j j
6= a . T h i s a e x i s t s s i n c e A h a s a t l e a s t t w o
e l e m e n t s . D e n e s
j
= a . T o s e e t h a t s i s n o t i n t h e l i s t i n g , n o t e t h a t f o r
e v e r y j , w e h a v e i n s u r e d t h a t s i s n o t t h e s a m e s e q u e n c e a s s
j
.
T h i s p r o o f i s k n o w n a s d i a g o n a l i z a t i o n a n d w a s r s t u s e d b y C a n t o r t o s h o w
t h e f o l l o w i n g .
C a n t o r r s t u s e d h i s d i a g o n a l a r g u m e n t t o s h o w
T h e o r e m 6 . 1 0 . T h e s e t
-
8/3/2019 M_Stob Mathematical Logic Book
30/193
2 6 C H A P T E R I . P R E L I M I N A R I E S
T h e o r e m 6 . 1 1 . S u p p o s e t h a t S i s a n i n n i t e s e t . T h e n t h e p o w e r s e t o f S ,
P ( S ) = f X j X S g , i s u n c o u n t a b l e . I n f a c t , t h e r e i s n o f u n c t i o n f r o m S
o n t o P ( S ) .
P r o o f . S u p p o s e t h a t f i s a f u n c t i o n f r o m S i n t o P ( S ) . D e n e a s e t X S
b y X = f x j x =2 f ( x ) g . W e c l a i m t h a t X i s n o t i n t h e r a n g e o f f . F o r
s u p p o s e t h a t X = f ( x ) f o r s o m e x 2 X . C o n s i d e r w h e t h e r x 2 X . I f x 2 X ,
t h e n x =2 f ( x ) = X b y t h e d e n i t i o n o f X . S o x =2 X . B u t t h e n x =2 f ( x ) s o
x 2 X , a g a i n b y t h e d e n i t i o n o f X .
T h e r e o b v i o u s l y i s a f u n c t i o n f r o m
P( S ) o n t o S s o T h e o r e m 6 . 1 1 c a n b e
v i e w e d a s s a y i n g t h a t P ( S ) h a s \ m o r e " e l e m e n t s t h a n S i n a c e r t a i n p r e c i s e
s e n s e .
E x e r c i s e s
1 . P r o v e T h e o r e m 6 . 4 .
2 . L e t F b e t h e s e t o f a l l f u n c t i o n s f r o m N t o N . W h i c h o f t h e f o l l o w i n g
s e t s a r e c o u n t a b l e ?
( a ) F .
( b ) T h e s e t o f f 2 F s u c h t h a t f i s e v e n t u a l l y 0 i . e . , t h e r e i s a n n
0
s u c h t h a t f ( n ) = 0 f o r a l l n n
0
.
( c ) T h e s e t o f f 2 F s u c h t h a t f i s e v e n t u a l l y c o n s t a n t .
( d ) T h e s e t o f a l l f s u c h t h a t f i s a f u n c t i o n f r o m N t o f 0 1 g
3 . P r o v e T h e o r e m 6 . 1 0 d i r e c t l y u s i n g a d i a g o n a l a r g u m e n t l i k e t h a t i n t h e
p r o o f o f T h e o r e m 6 . 9 .
4 . P r o v e t h a t t h e s e t o f i r r a t i o n a l r e a l n u m b e r s i s u n c o u n t a b l e .
5 . S h o w t h a t e v e r y i n n i t e s e t h a s a c o u n t a b l e s u b s e t .
-
8/3/2019 M_Stob Mathematical Logic Book
31/193
7 . C O M P U T A B I L I T Y 2 7
7 C o m p u t a b i l i t y
O n e o f t h e c e n t r a l c o n c e p t s o f m a t h e m a t i c s i s t h a t o f c o m p u t a t i o n . V e r y
r o u g h l y , a c o m p u t a t i o n i s a m e c h a n i c a l p r o c e d u r e f o r t r a n s f o r m i n g c e r t a i n
i n p u t s i n t o o u t p u t s . F a m i l i a r c o m p u t a t i o n s i n m a t h e m a t i c s i n c l u d e s u c h p r o -
c e d u r e s a s t h e a r i t h m e t i c o p e r a t i o n s t a u g h t i n g r a d e s c h o o l a n d t h e v a r i o u s
p r o c e d u r e s t a u g h t i n c a l c u l u s f o r d i e r e n t i a t i n g e l e m e n t a r y f u n c t i o n s . O n e
o f t h e c e n t r a l g o a l s o f t h e s e n o t e s i s t o g i v e a m a t h e m a t i c a l m o d e l o f c o m -
p u t a t i o n . W e w i l l p r o v i d e o n e s u c h m o d e l o f c o m p u t a t i o n i n C h a p t e r V a n d
u s e i t t o a n s w e r s o m e f u n d a m e n t a l q u e s t i o n s a b o u t p r o o f s i n C h a p t e r V I .
H o w e v e r i n t h i s s e c t i o n w e d i s c u s s s o m e o f t h e i n f o r m a l a s p e c t s o f t h e n o t i o n
o f c o m p u t a t i o n . C e r t a i n o f t h e s e i n f o r m a l f e a t u r e s w h i c h w e s h a l l a s s u m e
a r e p a r t o f o u r i n t u i t i o n a b o u t c o m p u t a t i o n a r e t h e f o l l o w i n g .
1 . T h e c o m p u t a t i o n i s g o v e r n e d b y a n a l g o r i t h m , a n i t e s e t o f i n s t r u c t i o n s
e a c h o f w h i c h i s a n i t e o b j e c t .
2 . T h e c o m p u t a t i o n i s p e r f o r m e d b y s o m e a g e n t t h a t c a r r i e s o u t t h e i n -
s t r u c t i o n s i n r e s p o n s e t o s o m e i n p u t .
3 . T h e a g e n t a c t s i n a d e t e r m i n i s t i c w a y . T h e e n t i r e f u t u r e o f t h e c o m -
p u t a t i o n i s d e t e r m i n e d b y i t s s t a t e a t a n y i n s t a n t . N o r a n d o m a c t i o n s
a r e p e r m i t t e d .
4 . T h e i n s t r u c t i o n s s p e c i f y s m a l l a n d d i s c r e t e a c t s . N o c o n t i n u o u s o r
a n a l o g d e v i c e s a r e p e r m i t t e d .
5 . T h e i n p u t s a r e n i t e o b j e c t s s a y w o r d s o v e r s o m e n i t e a l p h a b e t .
6 . T h e c o m p u t a t i o n m u s t t e r m i n a t e i n n i t e l y m a n y s t e p s o r a c t i o n s .
7 . T h e r e s h o u l d b e n o x e d , n i t e b o u n d o n t h e s i z e o f a l g o r i t h m , i n p u t ,
o r o u t p u t a n d n o x e d n i t e b o u n d o n t h e l e n g t h o f t i m e n e c e s s a r y t o
c o m p u t e t h e o u t p u t .
A l l o f t h e s e m a y b e c o n t r o v e r s i a l t o s o m e e x t e n t b u t t h e l a s t c o n d i t i o n
i s t h e m o s t c o n t e n t i o u s . P e r h a p s t h e n u m b e r o f e l e m e n t a r y p a r t i c l e s i n t h e
u n i v e r s e p r o v i d e s t h e d e s i r e d b o u n d o n e v e r y t h i n g . O n e t h i n g t h a t m i g h t b e
s a i d a b o u t t h i s h o w e v e r i s t h a t w e a r e a t t e m p t i n g t o d e s c r i b e t h e l o g i c a l a n d
t h e o r e t i c a l l i m i t a t i o n s o f c o m p u t a t i o n r a t h e r t h a n t h e p h y s i c a l o r p r a c t i c a l .
-
8/3/2019 M_Stob Mathematical Logic Book
32/193
2 8 C H A P T E R I . P R E L I M I N A R I E S
D e n i t i o n 7 . 1 . S u p p o s e t h a t A i s a n i t e s e t ( s o t h a t S E Q ( A ) i s c o u n t a b l y
i n n i t e ) a n d t h a t L S E Q ( A ) . L i s d e c i d a b l e i f t h e r e i s a n a l g o r i t h m w h i c h
o n i n p u t x 2 S E Q ( A ) h a s a s o u t p u t t h e c o r r e c t a n s w e r t o t h e q u e s t i o n
x 2 L ? ' .
W e c l a i m t h a t a l l o f t h e f o l l o w i n g l a n g u a g e s a r e d e c i d a b l e .
1 . T h e s e t o f f o r m u l a s o f p r o p o s i t i o n a l l o g i c ( a s a s u b s e t o f t h e s e t o f
w o r d s o v e r t h e a l p h a b e t f o r p r o p o s i t i o n a l l o g i c ) .
2 . T h e s e t o f p r i m e n u m b e r s ( a s a s u b s e t o f t h e s e t o f n a t u r a l n u m b e r s ) .
3 . T h e l a n g u a g e o f D e n i t i o n 4 . 6 .
N o t i c e t h a t i n o u r c o n c e p t i o n o f p r o p o s i t i o n a l l o g i c , t h e s e t o f s y m b o l s i s
n o t n i t e b u t i s r a t h e r c o u n t a b l y i n n i t e . T o v i e w l a n g u a g e s o v e r t h a t s e t o f
s y m b o l s a s a p p r o p r i a t e i n p u t s t o a n a l g o r i t h m , i t i s n e c e s s a r y t o r e c o d e t h e
l a n g u a g e o f p r o p o s i t i o n a l l o g i c i n t o a n i t e s e t o f s y m b o l s . T h i s c a n e a s i l y
b e d o n e . I n f a c t , t h e p r o p o s i t i o n a l v a r i a b l e P
2 3
w h i c h i s o n e s y m b o l i n o u r
l a n g u a g e c a n b e r e p r e s e n t e d i n a n i t e l a n g u a g e b y t h e s t r i n g P 2 3 o f t h r e e
s y m b o l s . T h u s w e n e e d o n l y i n c l u d e P a n d t h e t e n d i g i t s i n o u r l a n g u a g e
b e s i d e s t h e c o n n e c t i v e s y m b o l s a n d t h e p a r e n t h e s e s .
N o t e v e r y l a n g u a g e i s d e c i d a b l e h o w e v e r . W e p r o v e t h i s i n T h e o r e m 7 . 2 .
T h e o r e m 7 . 2 . F o r e v e r y n i t e A , t h e r e i s a l a n g u a g e L S E Q ( A ) s u c h
t h a t L i s n o t d e c i d a b l e .
P r o o f . A n a l g o r i t h m i s a n i t e o b j e c t o v e r s o m e n i t e l a n g u a g e . T h u s t h e r e
a r e o n l y c o u n t a b l y m a n y a l g o r i t h m s a n d t h u s o n l y c o u n t a b l y m a n y d e c i d a b l e
s e t s . B u t t h e r e a r e u n c o u n t a b l y m a n y l a n g u a g e s L o v e r A b y T h e o r e m
6 . 1 1 .
T h e p r o o f a b o v e i s r a t h e r u n s a t i s f y i n g i t d o e s n o t e x h i b i t a n y u n d e c i d a b l e
l a n g u a g e . A f t e r f o r m a l i z i n g t h e n o t i o n o f c o m p u t a t i o n , w e w i l l n d t h a t
m a n y i n t e r e s t i n g l a n g u a g e s a r e u n d e c i d a b l e .
A n a l g o r i t h m c a n r u n f o r e v e r . S u c h \ i n n i t e l o o p s " a r e u s u a l l y u n d e s i r -
a b l e b e h a v i o r i n a p r o g r a m . T h e r e i s n o s e n s e i n w h i c h w e c a n e x a m i n e t h e
o u t p u t o f t h e e n t i r e a l g o r i t h m . H o w e v e r t h e a l g o r i t h m c a n p r o d u c e i n t e r m e -
d i a t e o u t p u t s w h i c h c a n b e e x a m i n e d . F o r e x a m p l e , t h e r e i s a n a l g o r i t h m
w h i c h r u n s f o r e v e r w h i c h h a s a s o u t p u t s t h e d e c i m a l d i g i t s o f
p
2 . T h u s ,
w h i l e w e c a n n o t e x a m i n e t h e w h o l e o f t h e d e c i m a l e x p a n s i o n f o r
p
2 w e c a n
-
8/3/2019 M_Stob Mathematical Logic Book
33/193
7 . C O M P U T A B I L I T Y 2 9
e x a m i n e a r b i t r a r i l y l o n g n i t e i n i t i a l s e g m e n t s o f i t b y w a i t i n g l o n g e n o u g h
( p e r h a p s l o n g e r t h a n w e c a r e t o w a i t ) . T h i s s o r t o f b e h a v i o r o f a n a l g o r i t h m
l e a d s t o t h e f o l l o w i n g d e n i t i o n .
D e n i t i o n 7 . 3 . S u p p o s e t h a t A i s a n i t e s e t a n d L
S E Q ( A ) . L i s
e e c t i v e l y e n u m e r a b l e i f t h e r e i s a n a l g o r i t h m w h i c h h a s a s o u t p u t s a l l a n d
o n l y t h e e l e m e n t s o f L . ( I f L i s i n n i t e , t h e a l g o r i t h m r u n s f o r e v e r . )
T h e f o l l o w i n g l a n g u a g e s a r e e e c t i v e l y e n u m e r a b l e .
1 . T h e s e t o f f o r m u l a s o f p r o p o s i t i o n a l l o g i c .
2 . T h e s e t o f p r i m e n u m b e r s .
3 . T h e s e t o f n a t u r a l n u m b e r s n f o r w h i c h t h e r e a r e n o n z e r o n a t u r a l n u m -
b e r s x y z s u c h t h a t x
n
+ y
n
= z
n
.
N o t i c e s o m e t h i n g i n t e r e s t i n g a b o u t ( 3 ) u n t i l r e c e n t l y i t w a s n o t k n o w n
t h a t t h i s s e t w a s s i m p l y f 2 g ( t h i s i s F e r m a t ' s L a s t T h e o r e m w h i c h w a s p r o v e d
b y A n d r e w W i l e s ) . H o w e v e r , i t i s e a s y t o s e e t h a t t h e r e i s a n a l g o r i t h m t o
e n u m e r a t e t h i s s e t e v e n w i t h o u t a s s u m i n g t h e r e s u l t o f W i l e s .
T h e o r e m 7 . 4 . A l a n g u a g e L S E Q ( A ) i s d e c i d a b l e i f a n d o n l y i f b o t h L
a n d S E Q ( A ) ; L a r e e e c t i v e l y e n u m e r a b l e .
P r o o f . S u p p o s e r s t t h a t t h e r e i s a n a l g o r i t h m f o r a n s w e r i n g ` x 2 L ? ' W e
s h o w h o w t o e n u m e r a t e L a n d S E Q ( A ) ; L b y a n a l g o r i t h m . T h e a l g o r i t h m
f o r e n u m e r a t i n g L w o r k s a s f o l l o w s . F o r e a c h x 2 S E Q ( A ) t h e a l g o r i t h m
e x e c u t e s t h e p r o c e d u r e f o r a n s w e r i n g x 2 L a n d i f i t r e c e i v e s t h e a n s w e r
\ y e s " , o u t p u t s x . O f c o u r s e t h e a l g o r i t h m f o r e n u m e r a t i n g S E Q ( A ) ; L i s
s i m i l a r .
O n t h e o t h e r h a n d , s u p p o s e t h e r e a r e a l g o r i t h m s f o r e n u m e r a t i n g e a c h o f
L a n d S E Q ( A ) ; L . T h e a l g o r i t h m f o r d e c i d i n g L w o r k s a s f o l l o w s o n i n p u t
x . I t s i m u l a t e s e a c h o f t h e t w o g i v e n a l g o r i t h m s , s a y b y a l t e r n a t i n g s t e p s ,
a n d w a i t s u n t i l x i s o u t p u t b y o n e o f t h e t w o a l g o r i t h m s . I t t h e n a n s w e r s
a p p r o p r i a t e l y .
D e n i t i o n 7 . 5 . A f u n c t i o n f f r o m S E Q ( A ) t o S E Q ( A ) i s e e c t i v e l y c o m -
p u t a b l e i f t h e r e i s a n a l g o r i t h m w h i c h o n i n p u t x 2 S E Q ( A ) h a s o u t p u t
f ( x ) .
-
8/3/2019 M_Stob Mathematical Logic Book
34/193
3 0 C H A P T E R I . P R E L I M I N A R I E S
A n e e c t i v e l y c o m p u t a b l e f u n c t i o n m a y b e p a r t i a l w e w i l l u s u a l l y w r i t e '
o r f o r a p a r t i a l f u n c t i o n a n d r e s e r v e f , g , : : : f o r t o t a l f u n c t i o n s . R e c a l l t h a t
t h e c h a r a c t e r i s t i c f u n c t i o n o f a s e t B i s t h e f u n c t i o n f d e n e d b y f ( x ) = 1
i f x 2 B a n d f ( x ) = 0 o t h e r w i s e .
T h e o r e m 7 . 6 . L S E Q ( A ) i s d e c i d a b l e i f a n d o n l y i f t h e c h a r a c t e r i s t i c
f u n c t i o n o f L i s e e c t i v e l y c o m p u t a b l e .
A c o m p u t e r s c i e n t i s t w o u l d n o t b e h a p p y w i t h o u r t a l k a b o u t a l g o r i t h m s
s o f a r . A s w e d i s c u s s e d a b o v e , m o s t o f t h e c o m p u t a t i o n s w e h a v e a d m i t t e d
w o u l d u s e p h y s i c a l l y i m p o s s i b l e a m o u n t s o f r e s o u r c e s a n d e e c t i v e l y i n n i t e
a m o u n t s o f t i m e . T h e r e f o r e , t h e o r e t i c a l c o m p u t e r s c i e n t i s t s p a y a t t e n t i o n t o
t h e c o m p l e x i t y o f c o m p u t a t i o n . T h e f o l l o w i n g i n f o r m a l d e n i t i o n i s o n e w a y
t o b e g i n t o m e a s u r e t i m e - c o m p l e x i t y o f c o m p u t a t i o n .
D e n i t i o n 7 . 7 . 1 . G i v e n a n a l g o r i t h m , A , f o r d e c i d i n g m e m b e r s h i p i n a
d e c i d a b l e L S E Q ( A ) a n d a f u n c t i o n f f r o m N t o N , w e s a y A h a s
t i m e c o m p l e x i t y f i f f o r e v e r y n a n d e v e r y i n p u t x o f s i z e n , A a n s w e r s
t h e q u e s t i o n x 2 L i n l e s s t h a n o r e q u a l t o f ( n ) s t e p s .
2 . A n a l g o r i t h m A f o r d e c i d i n g m e m b e r s h i p i n a d e c i d a b l e L S E Q ( A )
i s p o l y n o m i a l t i m e i f A h a s t i m e c o m p l e x i t y p f o r s o m e p o l y n o m i a l p .
I n t h i s c a s e w e s a y a l s o t h a t t h e l a n g u a g e L i s i n p o l y n o m i a l t i m e .
O n e o f t h e m o s t i m p o r t a n t p r o b l e m s i n t h e o r e t i c a l c o m p u t e r s c i e n c e i s
t h e d e t e r m i n a t i o n o f w h i c h l a n g u a g e s h a v e p o l y n o m i a l t i m e a l g o r i t h m s .
E x e r c i s e s
1 . S u p p o s e t h a t L a n d M a r e d e c i d a b l e s e t s .
( a ) S h o w t h a t L \ M i s d e c i d a b l e .
( b ) S h o w t h a t L M i s d e c i d a b l e .
( c ) S h o w t h a t L
0
, t h e c o m p l e m e n t o f L , i s d e c i d a b l e .
2 . S u p p o s e t h a t L a n d M a r e e e c t i v e l y e n u m e r a b l e . S h o w t h a t L
\M
i s e e c t i v e l y e n u m e r a b l e .
3 . S u p p o s e t h a t L i s d e c i d a b l e a n d M L . I s M n e c e s s a r i l y d e c i d a b l e ?
-
8/3/2019 M_Stob Mathematical Logic Book
35/193
7 . C O M P U T A B I L I T Y 3 1
4 . S u p p o s e t h a t g a n d h a r e c o m p u t a b l e n u m b e r - t h e o r e t i c f u n c t i o n s . A r -
g u e t h a t f d e n e d b y f ( n ) = g ( h ( n ) ) i s e e c t i v e l y c o m p u t a b l e .
5 . W h i c h o f t h e f o l l o w i