Let f, X, Y and Z be given.
Apply andI to the current goal.
Let x be given.
Let y be given.
We use y to witness the existential quantifier.
Apply andI to the current goal.
An
exact proof term for the current goal is
(HYZ y (andEL (y ∈ Y) ((x,y) ∈ f) Hy)).
An
exact proof term for the current goal is
(andER (y ∈ Y) ((x,y) ∈ f) Hy).
∎