Let A, B, Y, f and g be given.
We prove the intermediate
claim Htotfg:
∀x : set, x ∈ (A ∪ B) → ∃y : set, y ∈ Y ∧ (x,y) ∈ (f ∪ g).
Let x be given.
Apply (binunionE A B x Hx) to the current goal.
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
(andEL (y ∈ Y) ((x,y) ∈ f) Hy).
An
exact proof term for the current goal is
(binunionI1 f g (x,y) (andER (y ∈ Y) ((x,y) ∈ f) Hy)).
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
(andEL (y ∈ Y) ((x,y) ∈ g) Hy).
An
exact proof term for the current goal is
(binunionI2 f g (x,y) (andER (y ∈ Y) ((x,y) ∈ g) Hy)).
∎