How can I proof (or better: convincingly argument) that my COQ theory is consistent?
Let's make the assumption that the COQ system and the standard library is consistent.
I know that a general formal proof of consistency is not possible due to the Gödelian incompleteness theorem.
But, are there some methods or rules of thumb how to argument that the theory is consistent?
To be a bit more concrete: Is it true that my theory is automatically consistent, if I only use inductive data types and no explicit axiomatic propositions?
1 Answers
The whole point of Coq is that you can trust that your definitions and proofs are logically sound if they are accepted by the system. There are two caveats, however:
You must trust that the system's underlying logic is sound, and that it is implemented correctly.
You must not extend the basic theory with arbitrary axioms, or enable unsafe options (e.g.
-type-in-type
).
This last point deserves some explanation. Definitions and proofs that are stated using commands such as Fixpoint
, Definition
, or Inductive
fall within Coq's basic theory, and thus are automatically consistent. This is why Coq places some restrictions these commands, such as only allowing for certain kinds of recursive functions. On the other hand, if you ask Coq to accept arbitrary propositions using the Axiom
command or similar ones, then you may end up with an inconsistent development.
Some axioms, such as the excluded middle and functional extensionality, are relatively well-studied and well-understood, and thus not too dangerous if assumed. As a rule of thumb, you can trust axioms that are declared in the standard library. You should nevertheless be careful: for instance, some standard axioms are incompatible with the -impredicative-set
option (see here).
If you want to ensure that your development does not rely on special axioms, you can use the Print Assumptions
command (see here) to list all axioms that are used in your results.