Assume H5: P y.
We prove the intermediate
claim L2:
x = y.
rewrite the current goal using
(If_i_1 (P y) y z H5) (from right to left).
An exact proof term for the current goal is H4.
rewrite the current goal using L2 (from left to right).
We will
prove y ∈ X ∧ P y.
Apply andI to the current goal.
An exact proof term for the current goal is H3.
An exact proof term for the current goal is H5.
We prove the intermediate
claim L2:
x = z.
rewrite the current goal using
(If_i_0 (P y) y z H5) (from right to left).
An exact proof term for the current goal is H4.
rewrite the current goal using L2 (from left to right).
We will
prove z ∈ X ∧ P z.
An
exact proof term for the current goal is
(Eps_i_ex (λz ⇒ z ∈ X ∧ P z) H1).