Mathematical logic is the branch of mathematics that investigates mathematics itself, defining concepts like theorems, proofs, and truth
Computability theory is very relevant to some key results of mathematical logic
Our goal in this section is to explain in which domains an algorithm can be given that decides the truth of a theorem
Proving theorems is difficult! Here are three well-known examples using symbolic logic,
- , there are infinitely many prime numbers, known to be true since Euclid, 2300 years ago
- , Fermat’s last theorem, infamously only proved in 1994 by Andrew Wiles
- , twin prime conjecture, unsolved
Can we automate this process? How can we approach this? Intuition from what we’ve learned says no
Formally, let’s treat these statements as strings and define a language consisting of true statements. Is this language decidable?
We define the alphabet as , where and are called Boolean operations, ”(” and ”)” are just parentheses, and are quantifiers, denotes variables, and are called relations
A string of the form is called an atomic formula has a arity , and all occurrences of must have the same arity
A formula is a well-formed string over this alphabet
is a formula if it
- Is an atomic formula
- Has the form , , or
- Has the form or
A quantifier may appear at any point, and its scope is the fragment of the statement appearing within the matched pair of parentheses or brackets following the quantified variable
All formulas are in prenex normal form, where quantifiers appear in the front of the formula
A variable that isn’t bound is called a free variable
A formula with no free variables is called a sentence or statement
Finally, we specify the universe over which variables may take values and specify the meaning of the relation symbols
A relation is a function from -tuples to
The arity of a relation symbol must match that of its assigned relation
A universe together with an assignment of relations to relation symbols is called a model, formally we write as a tuple where is the universe and is the relation assigned to symbol
The language of a model is the collection of formulas that use only the relation symbols the model assigns with the correct arity
If is a sentence in the language of a model, is either true or false in that model, and if it is true then we say is a model of
If is a model, we let the theory of M be the collection of true sentences in the language of that model, written as
With all this in place, we can move on to our question
Theorem: is decidable
Proof:
Write the input as , where is either or , and is a formula without quantifiers with variables
Define
has free variables
For , define the alphabet, all size columns of s and , and
A string over represents binary integers
For each such , we construct a finite automaton that accepts strings corresponding to -tuples whenever is true
To start with , we observe that is a Boolean combination of atomic formulas (single additions) that a DFA can verify straightforwardly
We then construct from
If then we construct to operate as , except it nondeterministically guesses the value of instead of receiving it
If , it is equivalent to , thus we can construct the finite automaton that recognizes the complement of and then apply the same construction
accepts any input if is true, so we test whether it accepts and forward that value
Theorem: is undecidable
Lemma: Let be a Turing machine and a string. We can construct a formula in the language of that contains a single free variable , such that is true if and only if accepts
The idea is the formula says is a suitably encoded accepting computation history of on , in a form that can be checked by the and operations
The proof of this is mechanically very complicated, but results in reducing to our problem and proving the theorem
Already, this is a very philosophically interesting theorem, but Kurt Gödel’s incompleteness theorems take it a step farther
A formal proof of a statement is a sequence of statements, , where and each follows from the preceding statements and certain basic axioms about numbers, with the following reasonable (and provable) assumptions,
- is decidable
- If a statement is provable then it is true
Theorem: The collection of provable statements in is Turing-recognizable
From our assumption that we can construct a proof-checker, we can make an algorithm that tests each string as a candidate for a proof of
Theorem: Some true statement in is not provable
Assume all true statements are provable, we can then construct a decider , contradicting our earlier theorem,
On input , runs given in the proof in parallel on and
Since one of these is true and therefore provable by assumption, must halt and can decide the truth of
Let’s construct an example of a true but unprovable statement
“On any input:
- Obtain via the recursion theorem
- Construct
- Run on input
- If accepts then accept”
is the construction we created in this machine
If there’s a proof of then we reach a contradiction in the behavior of , so there must not be a proof, in which case is true as claimed