# Can metalogic and model theory be formalized?

All of mathematics formulated using ZFC can be "formalized" in the sense that each statement could be translated into a logical string, and each proof can be translated into a formal proof. This is never actually done, but it is important to know that it could be done in principle.

However, I have never seen a formal language or proof theory for the subjects of metalogic, proof theory, or model theory, whose statements "discuss" the provable statements of logical theories. For example, all the proofs of things like compactness theorems, (in)completeness theorems, etc., seem to be naive, in the sense that they use human language and intuitionist logic in order to psychologically convince the reader of a particular statement.

Does there exist a way to formalize the sentences and proofs of metalogic in the same way that logic itself is formalized? Is there a book that develops metalogic/proof theory/model theory along these lines? Or are these subjects "inherently" naive for some in-principle philosophical reason?

It seems that the issues discussed in this answer could be addressed nicely by such a formalism.

• Certainly. I remember once when I was formulating a formalization of a variant of first-order logic allowing for empty domain of discourse (and thus restricting proofs somewhat as compared to regular first-order logic). I put the definitions into Coq and formally proved a soundness theorem for that formal logic system, which greatly reassured me that my definitions were correct. (Of course, at some point, you need to stop what otherwise would become an infinite regress, as I did in implicitly assuming the Coq proof assistant's metatheory was reasonable.) Jun 24, 2021 at 19:11

There's nothing special about formalizing any area of logic. As with formalizing any subject it's quite difficult, but it's not inherently more difficult than any other area of math.

Here are some examples I found with a quick google search:

• This CSSE thread discusses formal proofs of the compactness and completeness theorems.

• This paper looks at formalizing the independence of CH.

• Here's a treatment of the incompleteness theorems.

And so forth. Indeed, the whole starting point of "modern metalogic" is the realization that it can be construed as just another area of mathematics.

• I also have a somewhat-vague outline of how to formalize some of basic model theory in $\mathsf{ZFC}$ here. Jun 24, 2021 at 19:24