g odel numbers of terms and formulas we assign a unique
play

G odel Numbers of Terms and Formulas We assign a unique number to - PowerPoint PPT Presentation

G odel Numbers of Terms and Formulas We assign a unique number to each symbol in L NT as follows: 1 15 _ 3 E 17 8 5 < 19 = 7 ( 21 0 9 ) 23 S 11 v i 2 i + 13 Suppose s : s 1 . . . s n is a string of symbols, which constituting a


  1. G¨ odel Numbers of Terms and Formulas We assign a unique number to each symbol in L NT as follows: ¬ 1 · 15 _ 3 E 17 8 5 < 19 = 7 ( 21 0 9 ) 23 S 11 v i 2 i + 13 Suppose s : ⌘ s 1 . . . s n is a string of symbols, which constituting a well-formed term or formula of L NT . Naively, we could encode s by the number h #( s 1 ) , . . . , #( s n ) i where #( s i ) is the number corresponding to the symbol s i . However, it much better to encode s according to the inductive type of terms and formulas.

  2. Def 5.7.1. For each term t and formula ' , the G¨ odel numbers p t q and p ' q are defined as follows: p ¬ ↵ q = h 1 , p ↵ q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p 0 q = h 9 i p v i q = h 2 i i . p St q = h 11 , p t q i

  3. Def 5.7.1. For each term t and formula ' , the G¨ odel numbers p t q and p ' q are defined as follows: p ¬ ↵ q = h 1 , p ↵ q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p 0 q = h 9 i p v i q = h 2 i i . p St q = h 11 , p t q i Obs. p t q and p ' q are never divisible by 7. (Why?)

  4. Def 5.7.1. For each term t and formula ' , the G¨ odel numbers p t q and p ' q are defined as follows: p ¬ ↵ q = h 1 , p ↵ q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p 0 q = h 9 i p v i q = h 2 i i . p St q = h 11 , p t q i Example. p =0 S 0 q = h 7 , p 0 q , p S 0 q i = h 7 , h 9 i , h 11 , h 9 iii = h 7 , 2 10 , h 11 , 2 10 ii = 2 8 3 1025 5 (2 12 3 1025 +1) . Notice how fast p SSSS 0 q grows: p SSSS 0 q = h 11 , h 11 , h 11 , h 11 , h 9 iiiii = 2 12 3 2 12 3 21232123210

  5. Next Steps (Section 5.8) ∆ -definability of sets Terms := { p t q : terms t } = { a 2 N : a = p t q for some term t } , Formulas := { p ' q : formulas ' } = { a 2 N : a = p ' q for some formula ' } .

  6. ∆ -Definition of Terms = { p t q : t is a term } p ¬ ↵ q = h 1 , p ↵ q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p 0 q = h 9 i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p v i q = h 2 i i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p St q = h 11 , p t q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i

  7. ∆ -Definition of Terms = { p t q : t is a term } p ¬ ↵ q = h 1 , p ↵ q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p 0 q = h 9 i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p v i q = h 2 i i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p St q = h 11 , p t q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i Recall the inductive definition of an L NT -term t : it is either • a variable symbol v i , • St 1 where t 1 is term, • the constant symbol 0, • + t 1 t 2 or · t 1 t 2 or Et 1 t 2 where t 1 , t 2 are terms.

  8. ∆ -Definition of Terms = { p t q : t is a term } p ¬ ↵ q = h 1 , p ↵ q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p 0 q = h 9 i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p v i q = h 2 i i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p St q = h 11 , p t q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i Recall the inductive definition of an L NT -term t : it is either • a variable symbol v i , • St 1 where t 1 is term, • the constant symbol 0, • + t 1 t 2 or · t 1 t 2 or Et 1 t 2 where t 1 , t 2 are terms. Let’s start with ∆ -definition of (= { 2 2 i +1 : i = 1 , 2 , . . . } ) . Variables := { p v i q : i = 1 , 2 , . . . } by the formula Variable ( x ) : ⌘ ( 9 y < x )[ Even ( y ) ^ (0 < y ) ^ ( x = 2 Sy )] .

  9. ∆ -Definition of Terms = { p t q : t is a term } p ¬ ↵ q = h 1 , p ↵ q i p = t 1 t 2 q = h 7 , p t 1 q , p t 2 q i p + t 1 t 2 q = h 13 , p t 1 q , p t 2 q i p <t 1 t 2 q = h 19 , p t 1 q , p t 2 q i p ( ↵ _ � ) q = h 3 , p ↵ q , p � q i p 0 q = h 9 i p · t 1 t 2 q = h 15 , p t 1 q , p t 2 q i p v i q = h 2 i i p ( 8 v i )( ↵ ) q = h 5 , p v i q , p ↵ q i p St q = h 11 , p t q i p Et 1 t 2 q = h 17 , p t 1 q , p t 2 q i Recall the inductive definition of an L NT -term t : it is either • a variable symbol v i , • St 1 where t 1 is term, • the constant symbol 0, • + t 1 t 2 or · t 1 t 2 or Et 1 t 2 where t 1 , t 2 are terms. We would like to write: “ x is p St 1 q for some term t 1 ” “ x is p 0 q ” z }| { z }| { x = 2 10 _ Sy ( 9 y < x )[ Term ( y ) ^ x = 2 12 · 3 Term ( x ) : ⌘ Variable ( x ) _ ] | {z } h 11 ,y i _ · · · |{z} “ x is + t 1 t 2 or · t 1 t 2 or Et 1 t 2 ” However, there is a problem with this “ ∆ -formula”: It is a not legitimate for- mula of first-order logic! Note the circular use of the subformula Term ( y ) .

  10. ∆ -Definition of Terms = { p t q : t is a term } Definition. A term construction sequence for a term t is a finite sequence of terms ( t 1 , . . . , t ` ) such that t ` : ⌘ t and, for each k 2 { 1 , . . . , ` } , the term t k is either • a variable symbol, • the constant symbol 0, • St j for some j < k , or • + t i t j or · t i t j or Et i t j for some i, j < k .

  11. ∆ -Definition of Terms = { p t q : t is a term } Definition. A term construction sequence for a term t is a finite sequence of terms ( t 1 , . . . , t ` ) such that t ` : ⌘ t and, for each k 2 { 1 , . . . , ` } , the term t k is either • a variable symbol, • the constant symbol 0, • St j for some j < k , or • + t i t j or · t i t j or Et i t j for some i, j < k . Example. (0 , v 1 , Sv 1 , +0 Sv 1 ) is term construction sequence for the +0 Sv 1 .

  12. ∆ -Definition of Terms = { p t q : t is a term } Definition. A term construction sequence for a term t is a finite sequence of terms ( t 1 , . . . , t ` ) such that t ` : ⌘ t and, for each k 2 { 1 , . . . , ` } , the term t k is either • a variable symbol, • the constant symbol 0, • St j for some j < k , or • + t i t j or · t i t j or Et i t j for some i, j < k . Example. (0 , v 1 , Sv 1 , +0 Sv 1 ) is term construction sequence for the +0 Sv 1 . Lemma. Every term t has a term construction sequence of length at most the number of symbols in t . (Easy proof by induction.)

  13. ∆ -Definition of Terms = { p t q : t is a term } Definition. A term construction sequence for a term t is a finite sequence of terms ( t 1 , . . . , t ` ) such that t ` : ⌘ t and, for each k 2 { 1 , . . . , ` } , the term t k is either • a variable symbol, • the constant symbol 0, • St j for some j < k , or • + t i t j or · t i t j or Et i t j for some i, j < k . Key to defining Terms : We will write a ∆ -formula defining the set TermConSeq = { ( c, a ) : c = h p t 1 q , . . . , p t ` q i and a = p t ` q where ( t 1 , . . . , t ` ) is a term construction sequence } .

  14. ∆ -Definition of Terms = { p t q : t is a term } TermConSeq ( c, a ) : ⌘ " Codenumber ( c ) ^ ( 9 ` < c ) Length ( c, ` ) ^ IthElement ( a, ` , c ) ^ " ( 8 k  ` )( 9 e k < c ) IthElement ( e k , k, c ) ^ 0 1 Variable ( e k ) ## B _ e k = 2 10 } C “ e k is p Se j q ” } } “ e k is p 0 q ” B C z }| { B C e k = 2 12 · 3 Se j ] B C _ ( 9 j < k )( 9 e j < c )[ IthElement ( e j , j, c ) ^ @ A _ · · · Key to defining Terms : We will write a ∆ -formula defining the set TermConSeq = { ( c, a ) : c = h p t 1 q , . . . , p t ` q i and a = p t ` q where ( t 1 , . . . , t ` ) is a term construction sequence } .

  15. ∆ -Definition of Terms = { p t q : t is a term } Now there is an obvious way to define Term ( a ): Term ( a ) : ⌘ ( 9 c ) TermConSeq ( c, a ) . To make this a ∆ -formula, we need an upper bound on c as a function of a .

  16. ∆ -Definition of Terms = { p t q : t is a term } Now there is an obvious way to define Term ( a ): Term ( a ) : ⌘ ( 9 c ) TermConSeq ( c, a ) . To make this a ∆ -formula, we need an upper bound on c as a function of a . Suppose a = p t q . Another easy lemma by induction: The number of symbols in t is at most a . Therefore, there exists a term construction sequence ( t 1 , . . . , t ` ) for t with length  a . We may assume that each t k is a subterm of t , so that p t k q  p t q = a for all k 2 { 1 , . . . , ` } . Let c := h p t 1 q , . . . , p t ` q i . We have c = 2 p t 1 q +1 3 p t 2 q +1 · · · ( p ` ) p t ` q +1  ( p ` ) p t 1 q + ··· + p t ` q + `  ( p ` ) ` a + `  ( p a ) a 2 + a  ( a + 1) a 3 using the (easy) fact that the a th prime number p a is at most ( a + 1) a .

  17. ∆ -Definition of Terms = { p t q : t is a term } Now there is an obvious way to define Term ( a ): Term ( a ) : ⌘ ( 9 c ) TermConSeq ( c, a ) . To make this a ∆ -formula, we need an upper bound on c as a function of a . We may therefore take Term ( a ) : ⌘ ( 9 c  ( a + 1) a 3 ) TermConSeq ( c, a ) .

Recommend


More recommend