Gödel's completeness theorem and the undecidability of first-order logic

You got the right idea for part 1, but it is unusual to use the logical notation that you do: $\neg$, $\forall$, and $\exists$ are logical operators, but $\models$ is a metalogic symbol; purists will not like you mixing those up. So, it may be better to use the English 'some' and 'all' and 'not'

For part 2: here is where you use the result of part 1! In particular, in order to decide whether $\varphi$ is valid or not, you can decide whether $\neg \varphi$ is satisfiable or not: if $\neg \varphi$ is satisfiable, then $\varphi$ is not valid, but if $\neg \varphi$ is not satisfiable, then $\varphi$ is valid. And now you just combine that with Godel's completeness result (to be precise: the theorem that a statement is provable if and only if it is valid ... the more difficult 'if' part of which is the completeness theorem): if $\varphi$ is valid, then it is provable, and if $\varphi$ is not valid, then it is not provable.

So for that first part: if you have algorithm $\mathcal{A}$ that can figure put whether $\varphi$ is satisfiable or not for any $\varphi$, then design algorithm $\mathcal{B}$ that is trying to figure out whether $\varphi$ is provable or not as follows:

  1. Take in $\varphi$

  2. Negate $\varphi$

  3. Call algorithm $\mathcal{A}$ with $\neg \varphi$

4a. If algorithm $\mathcal{A}$ says that $\neg \varphi$ is satisfiable, then print '$\varphi$ is not provable!'

4b. If algorithm $\mathcal{A}$ says that $\neg \varphi$ is not satisfiable, then print '$\varphi$ is provable!'


For my own purposes, I'm archiving here my best attempt at integrating, in a compact manner, everything that was mentioned in the answers to my original question. Any comments or critiques of any kind are always welcome. Thanks again to the contributors.

Definitions. A sentence $\varphi$ is valid if it is true in all models. In contrast, $\varphi$ is satisfiable if it is true in some model.

Completeness theorem with soundness. A sentence in first-order logic is provable if and only if it is valid.

Then the answers to the problems stated above can be given as follows:

  1. Let $\mathscr{M}_x$ be a model, $x\in\mathbb{N}$. Let $\varphi$ be a sentence in first-order logic. Let $P(x)$ be the predicate "$\varphi$ is true in $\mathscr{M}_x$." Then $\forall x P(x) \equiv \neg \exists x P(x)$ and $\exists x P(x) \equiv \neg \forall x \neg P(x)$ by the above definitions and De Morgan's laws.

  2. Suppose we have $\mathcal{A}$. Let $\mathcal{B}$ be the algorithm defined by the following procedure. Step 1: take $\varphi$ as input. Step 2: negate $\varphi$. Step 3: call $\mathcal{A}$ with input $\neg\varphi$, written $\mathcal{A}(\neg\varphi)$. Step 4, case (a): If $\mathcal{A}(\neg\varphi)$ returns "$\neg\varphi$ is satisfiable," then by the above equivalences $\varphi$ is not valid and by the completeness theorem it is not provable. Step 4, case (b): If $\mathcal{A}(\neg\varphi)$ returns "$\neg\varphi$ is not satisfiable," then by the above equivalences $\varphi$ is valid and by the completeness theorem it is provable. Thus by making use of $\mathcal{A}$ we have obtained $\mathcal{B}$ such that $\mathcal{B}$ decides whether $\varphi$ is provable or not. By a symmetric argument we can obtain $\mathcal{A}$ if given $\mathcal{B}$.