TITLE: Is Heyting arithmetic sufficient to prove its own (formalized) existence property?
QUESTION [9 upvotes]: Let $\mathsf{HA}$ denote first-order Heyting arithmetic (viꝫ., Peano axioms with unrestricted recursion scheme, in first-order intuitionistic logic).  It is known (e.g., Troelstra & van Dalen, Constructivism in Mathematics (1988), 3.5.6; Beeson, Foundations of Constructive Mathematics (1985), VII.5.3 but concerning a different system; or Troelstra (ed), Metamathematical Investigations of Intuitionistic Arithmetic and Analysis (1973), 3.1.5) that $\mathsf{HA}$ has the number existence property:

(NEP) If $\mathsf{HA} \vdash \exists n. P(n)$ for some closed formula $\exists n. P(n)$, then in fact there is a natural number $n$ such that $\mathsf{HA} \vdash P(\overline{n})$ (with $\overline{n}$ the obvious term that denotes $n$).

Now this number existence property be formalized as a statement of arithmetic $\forall “P”.((\mathsf{HA} \vdash \exists n. P(n)) \Rightarrow \exists n. (\mathsf{HA} \vdash P(\overline{n})))$, beginning with a universal quantifier ranging over Gödel codes for formulas $P$.  So we can ask whether $\mathsf{HA}$ proves this formalized number existence property.
The techniques used to prove NEP in the references above all seem impossible to formalize in $\mathsf{HA}$, because they depend on something (like cut-elimination or formalization of arithmetical truth) that is beyond its power.  Yet I also don't see how NEP would imply the consistency of $\mathsf{HA}$.  So here are my questions:
Questions:

Does $\mathsf{HA}$ prove the (formalized) number existence property, $\forall “P”.((\mathsf{HA} \vdash \exists n. P(n)) \Rightarrow \exists n. (\mathsf{HA} \vdash P(\overline{n})))$, for $\mathsf{HA}$?

If not, does it at least prove $((\mathsf{HA} \vdash \exists n. P(n)) \Rightarrow \exists n. (\mathsf{HA} \vdash P(\overline{n})))$ for each $P$?

If a negative answer to (1), does $\forall “P”.((\mathsf{HA} \vdash \exists n. P(n)) \Rightarrow \exists n. (\mathsf{HA} \vdash P(\overline{n})))$ imply the consistency of $\mathsf{HA}$?

If a negative answer to (2), does $((\mathsf{HA} \vdash \exists n. P(n)) \Rightarrow \exists n. (\mathsf{HA} \vdash P(\overline{n})))$ imply the consistency of $\mathsf{HA}$ for some judiciously chosen $P$?

REPLY [10 votes]: The answers to all the questions are negative.
First, none of the statements implies the consistency of HA, since if HA is inconsistent, all the statements trivially hold.
On the other hand, considering the special case where $P$ is $\Delta_0$, the schema in 2 implies (classically, to make things simpler) “HA is inconsistent or $\Sigma_1$-sound”. More precisely, if HA proved 2, then PA + Con(PA) would prove the local $\Sigma_1$-reflection principle for HA, which implies the same principle for PA by (HA-verifiable) $\Sigma_1$-conservativity. Thus, PA + Con(PA) would prove its own consistency, contradicting Gödel’s theorem.