Axiom checking as type checking

axiomslogicmodel-theorytype-theory

There is a connection between type theory and logic, where types are propositions, and type checking performs the role of checking whether a proof of a proposition is correct (Curry-Howard isomorphism).

But I can imagine a different connection: There seems to be a similarity between type checking and checking whether a particular mathematical structure satisfies a set of axioms.

We might say that propositions (axioms) are formalized as types (just as in the CH-isomorphism), but that now, an instance of a proposition (i.e. an instance of that type) is not a proof of the proposition, but a model of it. Type checking then takes the role of checking whether a particular mathematical structure is indeed a model of that axiom.

Is there a formalization of "checking whether a structure is a model of a proposition" as type checking? Could you explain such a formalization, or point to an explanation of it?

Best Answer

The key observation of the Curry-Howard correspondence is that the inductive structure of terms in type theory mirrors the inductive structure of proofs in logic.

For example, given two terms $t_1$ and $t_2$ of types $A_1$ and $A_2$, I can construct a term $(t_1,t_2)$ of the product type $A_1\times A_2$. Similarly, given two proofs $p_1$ and $p_2$ of the propositions $Q_1$ and $Q_2$, I can put them together to form a proof $(p_1,p_2)$ of the conjunction $Q_1\land Q_2$.

On the other hand, models of a proposition (at least in ordinary semantics for first-order / predicate logic) just don't have this same kind of inductive structure. Given models $M_1$ and $M_2$ of sentences $\varphi_1$ and $\varphi_2$, there's no canonical way of constructing a model of the conjunction $\varphi_1\land \varphi_2$. So I'm not optimistic that the kind of extension of Curry-Howard that you're looking for is possible.

It's conceivable to me that you could change the notion of "model" to something sufficiently syntactic to make this work - but that would likely involve making a "model" of $\varphi$ essentially an encoding of a proof of $\varphi$, and then relying on the usual Curry-Howard correspondence.

Related Question