An exact proof term for the current goal is Hp0prop.
We prove the intermediate
claim Hp0eq:
apply_fun p0 0 = x.
We prove the intermediate
claim Hp1eq:
apply_fun p0 1 = y.
We use q to witness the existential quantifier.
Apply andI to the current goal.
Apply andI to the current goal.
Apply andI to the current goal.
rewrite the current goal using Hq0 (from left to right).
rewrite the current goal using Hp1eq (from left to right).
Use reflexivity.
rewrite the current goal using Hq1 (from left to right).
rewrite the current goal using Hp0eq (from left to right).
Use reflexivity.
∎