Let f, X, Y and x be given.
Apply iffI to the current goal.
We prove the intermediate
claim Hex:
∃y : set, y ∈ Y ∧ (x,y) ∈ f.
Apply Hex to the current goal.
Let y be given.
We use y to witness the existential quantifier.
An
exact proof term for the current goal is
(andER (y ∈ Y) ((x,y) ∈ f) Hy).
Apply Hex to the current goal.
Let y be given.
An exact proof term for the current goal is (Hdom x y Hxy).
∎