Let n be given.
rewrite the current goal using
Pi_nat_S f n Hn (from left to right).
We prove the intermediate
claim L1:
∀i ∈ n, nat_p (f i).
Let i be given.
Assume Hi.
Apply Hf to the current goal.
An exact proof term for the current goal is Hi.
We prove the intermediate
claim L2:
nat_p (f n).
Apply Hf to the current goal.
We prove the intermediate
claim L3:
nat_p (Pi_nat f n).
An
exact proof term for the current goal is
Pi_nat_p f n Hn L1.
Apply IHn L1 H2 to the current goal.
Let i be given.
Assume H.
Apply H to the current goal.
We use i to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is Hi.
An exact proof term for the current goal is H3.
We use n to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is H2.
∎