Let f, X, Y and U be given.
Let y be given.
Let x be given.
We prove the intermediate
claim HxX:
x ∈ X.
An exact proof term for the current goal is (HUX x HxU).
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfun x HxX).
rewrite the current goal using Hyx (from left to right).
An exact proof term for the current goal is HfxY.
∎