Let X, Y and z be given.
We prove the intermediate
claim L1:
∃x ∈ X, z ∈ {pair x y|y ∈ Y x}.
An
exact proof term for the current goal is
(famunionE X (λx ⇒ {pair x y|y ∈ Y x}) z H1).
Apply (exandE_i (λx ⇒ x ∈ X) (λx ⇒ z ∈ {pair x y|y ∈ Y x}) L1) to the current goal.
Let x be given.
Apply (ReplE_impred (Y x) (pair x) z H3) to the current goal.
Let y be given.
rewrite the current goal using H5 (from left to right).
rewrite the current goal using
proj0_pair_eq (from left to right).
We will
prove pair x (proj1 (pair x y)) = pair x y ∧ x ∈ X ∧ proj1 (pair x y) ∈ Y x.
rewrite the current goal using
proj1_pair_eq (from left to right).
We will
prove pair x y = pair x y ∧ x ∈ X ∧ y ∈ Y x.
Apply and3I to the current goal.
We will
prove pair x y = pair x y.
Use reflexivity.
An exact proof term for the current goal is H2.
An exact proof term for the current goal is H4.
∎