First-order logic

The main theorem of last semester was that the set of logical consequences of any r.e. set of axioms is r.e.

Today we will prove that the set of logical truths(logical consequences of no axioms)in any sufficiently rich language is not decidable.

"Mathematicians will never be out of a job---since they can't be replaced by a machine."

(Last semester's result was that mathematicians can do their job: if it follows there is a proof.)

As always, we shall prove that logical truth is hard by reducing it to the halting problem. That is, we shall show how, for any register machine $P$ in the language $ \{|\}$ to produce (using a recursive procedure) a sentence of first-order logic $\phi_P$ such that

\[P:\fbox{\hspace*{0.2ex}}\longrightarrow\mbox{halt if and only if }\Vdash\phi_{P}.\]

Remarks: Let $P$ be a program in the language $\mathcal{A} =\{|\}$with instructions $\alpha_{0},\dots ,\alpha_{k}$. Let $n$ be the smallest number such that all the registers occurring in $P$ are among $R_{0},\dots ,R_n$. A configuration is an $n+1$-tuple

\[(L,m_{0},\dots ,m_{n}),\]
with $L\le k$ The intended interpretation of a configuration is that the machine is executing instruction $L$ and each register $R_i$ has $m_i$ strokes in it. We say that a configuration is the configuration of the machine after $s$ steps if ... . In particular, the initial configuration, that is, the configuration after 0 steps is $(0,0,\dots ,0)$.

The only halt instruction is $\alpha_k$, and so the machine halts if and only if the is some step $s$ such that the configuration at step $s$ is $(k,m_{0},\dots ,m_n)$ for some numbers $m_{0},\dots ,m_n$.

If $P$ halts, let $s_P$ be the step at which it does.

Finally, let our symbol set be $R,<,f,c$, where $R$ is an $n+3$-ary relation, $<$ is binary, $f$ is unary, and $c$ is a constant symbol.

Motivation: For program $P$ let $\mathcal{A}_P$ be an associated structure defined as follows:

  1. $P$ does not halt. The domain of the structure $A_P$ is $\Bbb N$ (the natural numbers). $<$ is the obvious thing, $c$ is 0, $f$ is the successor function (+1). $R(s,L,m_{0},\dots ,m_n)$ holds if and only if ... .
  2. $P$ halts. Let $e$ be max$(k,s_{p})$. The domain $A_P$ of our structure will be $\{0,\dots ,e\}$. < and $c$ are interpreted as before: < is the obvious order, and $c$ is 0. $f$ has to get changed: it can't be the successor function because we've left out the successor of $e$. So, let $f$ be the successor function except on $e$, and let $f(e)=e$. Let $R$ be interpreted as before.

The structures were just to help us see what we're doing, what we really need is a sentence, and we turn to that now.

We break the project up into parts.

First, we define $\psi_P$ which describes what $P$ does on the empty input. We'll have to add that $P$ halts later.

We write $\overline{n}$ for $f\cdots fc$ with $n$ $f$s.

$\psi_P=$

\[\psi_{0}\land R\overline{0}\dots\overline{0}\land\psi_{\alpha_0}\land\cdots\land\psi_{\alpha_{k-1}}\]

$\psi_0=$

\[< \mbox{ is an ordering}\land\forall x(c\le x)\land\forall x(x<fx\lor x\equiv fx)\land\forall x(\exists yx<y\rightarrow(x<fx\land\forall z(x<z\rightarrow(fx\le z)))).\]

Now, the heart of the proof, the instructions:

If $\alpha$ is an add instruction, say, L LET $R_{i}=R_{i}+|$, then $\psi_{\alpha}=$

\[\forall x\forall y_{0}\cdots\forall y_{n}(Rx\overline{L}y_{0}\dots y_{n}\rightarrow(x<fx\land Rfx\overline{L+1}y_{0}\dots fy_{i}\dots y_{n}))\]

Subtract instructions are just the same.

PRINT instructions "do nothing." That's ok because for this problem we don't care about what gets printed.

Finally, jumps: $\psi_\alpha=$

\[\forall x\forall y_{0}\cdots\forall y_{n}(Rx\overline{L}y_{0}\dots y_{n}\rightarrow(x<fx\land(y_{i}\equiv 0\rightarrow Rfx\overline{L'}y_{0}\dots y_{n})\land\dots\]

That completes $\psi_P$. Finally, the sentence we need, $\phi_P$ is

\[ \psi_P\rightarrow\exists x\exists y_{0}\cdots\exists y_{n}Rx\overline{k}y_{0}\dots y_{n}.\]

That does it: Suppose $\phi_P$ is a logical truth. Then, whenever $\psi_P$ holds, that is, whenever we have a machine $P$ computation, it reaches a halt instruction. Thus, if we could decide what sentences are logical truths, we could decide the halting problem, and so the problem of deciding logical truth is also unsolvable.

-- ProfessorShaughanLavine? - 09 Feb 2005