Title: 3' Typographical Number Theory TNT
13. Typographical Number Theory (TNT)
- One last step to develop a formal system with
enough structure to explore the limits of what
can be computed - TNT is a system which encodes statements about
the natural numbers (0,1,2,3,4,5,). That is, no
negative numbers, fractions, irrationals,
imaginaries, etc. - Based on Hofstadter, Chapter 8
2Typical statements in Number Theory
- (1) 5 is prime
- (2) 2 is not a square
- (3) 1729 is a sum of two cubes
- (4) No sum of two positive cubes is itself a
cube - (5) There are infinitely many prime numbers
- (6) 6 is even.
We want a formal system in which these can be
written and even proved or disproved
3Symbols of TNT
- Most of those of propositional calculus carry
over with the same interpretations - ? ? ? ?
- ? ?
- Some new ones as well
- S 0 .
- a b c d e
- ? ? ( )
4Rules of Well-Formedness
- NUMERALS
- 0 is a numeral.
- A numeral preceded by S is also a numeral where
S stands for the successor of. - For example,
- zero 0
- one S0
- two SS0
- three SSS0 etc.
- Â
5- VARIABLES
- a is a variable.
- b, c, d, and e can also be variables
- A variable followed by a prime is also a
variable a b c etc. - Â
6- TERMS
- All numerals and variables are terms.
- A term preceded by S is also a term.
- If s and t are terms, then so are
- (s t) and (s.t).
- The mathematical symbols have their usual
interpretations - Plus
- Times .
- Groupings ( )
- Equals
- Â
-
7ATOMS If s and t are terms, then s t is an
atom.These will be strings which are statements
of equality such as SS0 S0 or (S0 . S0)
S0. If an atom contains a variable u, then u
is free in it
- Closed formulas contain no free variables. They
are sentences of TNT. - Open formulas contain at least one free variable.
They are sentences without subjects and are
called predicates. - (b S0) SS0 is an open formula and b is
a free variable.
8Quantifiers
- Open formula can be closed using quantifiers
- If u is a variable, and x is a well-formed
formula in which u is free, then the following
strings are well-formed formulas - ?u x, ?u x
- For example,
- ?b (b S0) SS0
- ?b (b S0) SS0
- These mean, there exists a number b and for
all numbers b.
9Well formed rules from before.
Negation A well-formed formula preceded by a
bar is well-formed Compound statements If x
and y are well-formed formulas, and provided
that no variable which is free in one is
quantified in the other, then the following are
all well-formed formulas ? x ? y?, ?x ? y?,
? x? y? Â
10Translating our sentences into TNT
- Lets start with the easy ones
- (6) 6 is an even number.
- There exists a number e such that 2 times e
equals 6. - ?e (SS0 . e) SSSSSS0
- 2 is not a square.
- There does not exist a number b, such that b
times b equals 2. - ??b (b . b) SS0 or ?b?(b . b) SS0
11- 1729 is a sum of two cubes
- There exist numbers b and c such that b times b
times b, plus c times c times c equals 1729. - ?b ?c SSSSSS........SSSSSSS0 (((b . b) . b)
((c . c) . c)) - ??________________?
- 1729 of them
12- Alternatively
-
- ?b ?c (((SSSSSSSSSS0 . SSSSSSSSSS0) .
(SSSSSSSSSS0) ((SSSSSSSSS0 . SSSSSSSSS0) .
SSSSSSSSS0)) (((b . b) .b) ((c .c) .c)) - Â or
- ?b ?c (((SSSSSSSSSSSS0 . SSSSSSSSSSSS0) .
SSSSSSSSSSSS0) ((S0 . S0) . S0)) (((b .b) .b)
((c . c) . c ))
1729 93 103 123 13
13- (4) No sum of two positive cubes is itself a cube
- For all numbers b and c greater than 0, there
is no number a such that a times a times a equals
b times b times b plus c times c times c. - Suppose we want 7 is not the sum of two positive
cubes, we negate 7 is the sum of two positive
cubes - ??b ?c SSSSSSS0 (((Sb . Sb) . Sb) ((Sc .
Sc) . Sc)) -
- Now replace SSSSSSS0 by ((a .a) . a), which is a
cubed - ??b ?c ((a . a) .a) (((Sb .Sb) . Sb)
((Sc.Sc) . Sc))Â -
- This formula is open, since a is free, hence we
need - ?a ??b ?c ((a . a) .a) (((Sb .Sb) . Sb)
((Sc.Sc) . Sc)) - Â
14- 5 is prime.
- There do not exist numbers a and b, both
greater than 1, such that 5 equals a times b. - ??a ?b SSSSS0 (SSa . SSb)
- (5) There are infinitely many prime numbers.
- For each number a there exists a number b
greater than a, with the property that there do
not exist numbers c and d, both greater than 1,
such that b equals c times d. - If we wanted a plus e plus 1 is prime we would
write - ??c ?d (a Se) (SSc . SSd)Â
- Now to get a number greater than a and primeÂ
- ?e ??c ?d (a Se) (SSc . SSd)
- Â This is independent of our choice of aÂ
- ?a ?e ??c ?d (a Se) (SSc . SSd)
15Five Axioms of TNT
- AXIOM 1 ?a ?Sa 0
- AXIOM 2 ?a (a 0) a
- AXIOM 3 ?a ?b (a Sb) S(a b)
- AXIOM 4 ?a (a . 0) 0
- AXIOM 5 ?a ?b (a . Sb) ((a . b) a)
16Rules of TNT
- Rules of Equality
- SYMMETRY
- If r s is a theorem, then so is s r.
- TRANSITIVITY
- If r s and s t are theorems, then
r t is a theorem. - Â Rules of Successorship
- ADD S
- If r t is a theorem, then so is Sr St.
- DROP S
- If Sr St is a theorem, then so is r t.
17- Rule of Interchange
- Suppose u is a variable. Then the strings
?u? and ??u are interchangeable anywhere
inside any theorem. - For all u, it is not the case that
- There does not exist a u such that
- Â
- Example
- AXIOM 1 ?a ?Sa 0
- ? ?a Sa 0
-
18- Â Rule of Existence
- Suppose a term (which may contain variables as
long as they are free) appears once, or several
times, in a theorem. Then any (or several, or
all) of the appearances of the term may be
replaced by a variable which otherwise does not
occur in the theorem, and the corresponding
existential quantifier must be placed in front. - if weve seen something is true once, then we
know a solution exists - AXIOM 1 ?a ?Sa 0
- ?b?a ?Sa b
19Some more complicated rules
- Rule of Specification
- Suppose u is a variable which occurs inside
the string x. If the string ?ux is a
theorem, then so is x, and so are any strings
made from x by replacing u, wherever it occurs,
by one and the same term. - If its true every time, its true for a specific
instance - ?a ?Sa 0
- ?S0 0
- ?Sa 0 Theorems can have
?S(bS0) 0 free variables! - Restriction the term which replaces u must not
contain any variable that is quantified in x. -
20- Rule of Generalization
- Suppose x is a theorem in which u, a variable,
occurs free. Then ?u x is a theorem. - ?Sa 0
- ?a ?Sa 0
- Theorems about free variables are implicitly
about all possible instances. - Restriction no generalization is allowed in a
fantasy on any variable which appeared free in
the fantasys premise
21Sample derivation
- (1) ?a ?b (a Sb) S(a b) axiom 3
- (2) ?b (S0 Sb) S(S0 b) specification
- (S0 for a)
- (3) (S0 S0) S(S0 0) specification
- (0 for b)
- (4) ?a (a 0) a axiom 2
- (5) (S0 0) S0 specification
- (S0 for a)
- (6) S(S0 0) SS0 add S
- (7) (S0 S0) SS0 transitivity
(lines 3,6)
22Are all true statements theorems?
- (0 0) 0
- (0 S0) S0
- (0 SS0) SS0
- (0 SSS0) SSS0
- (0 SSSS0) SSSS0
- etc.
- But what about ?a (0 a) a ?
- This is not a theorem of the system we have!
- This is called ?-incompleteness
23- A system is ?-incomplete if all the strings in a
pyramidal family are theorems, but the
universally quantified summarizing string is not
a theorem. - Note that both
- ?a (0 a) a
- and ??a (0 a) a
- are nontheorems of the TNT we have described.
- They are undecidable.
- Can we fix it?
- Only by adding another rule, the rule of induction
24First, some notation
- Let Xa stand for a well-formed formula in
which a is free. - Then XSa/a will stand for the string but with
every occurrence of a replaced by Sa. - Similarly X0/a will stand for the formula but
with every occurrence of a replaced by 0.
25This allows us to state the
- Rule of Induction
- Suppose u is a variable, and Xu is a
well-formed formula in which u occurs free. - If both ?u ?Xu ? XSu/u? and X0/u are
theorems, then ?u Xu is also a theorem. - Â
26Can we now prove the earlier true formula?
- (1) ?a ?b (a Sb) S(a b) axiom 3
- (2) ?b (0 Sb) S(0 b) specification
- (3) (0 Sb) S(0 b) specification
- (4) push
- (5) (0 b) b premise
- (6) S(0 b) Sb add S
- (7) (0 Sb) S(0 b) carry over
line 3 - (8) (0 Sb) Sb transitivity
- (9) pop
27- So then
- (10) ?(0 b) b ? (0 Sb) Sb ? fantasy
rule - (11) ?b ?(0 b) b ? (0 Sb) Sb?
generalization - (12) (0 0) 0 specification of
axiom 2 - By induction, we can deduce
- Â ?b (0 b) b
- Thus, we have resolved the ?-incompleteness
problem! - Is this new version of TNT now complete?