Let A, Y and f be given.
Let x and y be given.
We prove the intermediate
claim HxA:
x ∈ A.
An exact proof term for the current goal is (Hdom x y Hxy).
We prove the intermediate
claim HappY:
apply_fun f x ∈ Y.
We prove the intermediate
claim HappEq:
apply_fun f x = y.
rewrite the current goal using HappEq (from right to left).
An exact proof term for the current goal is HappY.
∎