Coq's standard library says that this inductive type gives the Peano natural numbers :
Inductive nat :=
| O : nat
| S : nat -> nat.
It sounds right, because we can prove in Coq all Peano's axioms on nat
, including the induction principle, which is given by Coq as nat_ind
.
But this repo claims it has a proof in Coq of Goodstein's theorem. And we know that this theorem is not provable with Peano's axioms only. So it seems that Coq's nat
is stronger than Peano's axioms, it would rather be a model of them, in which Goodstein's theorem is true. Is this correct ?
Can Coq prove the same arithmetical theorems on nat
as the ZFC set-theory does on standard natural numbers ? Same question if we add the classical logic in Coq :
Axiom excluded_middle : forall P : Prop, P \/ ~P.
The underlying question behind this is the truth of Coq proofs. What guarantee do they give ? I am a developer so I am particularly interested in the proofs of programs, hence the specific question on arithmetic.