We prove the intermediate
claim L1:
X = (X ∖ {y}) ∪ {y}.
Apply HX to the current goal.
rewrite the current goal using L1 (from left to right).
An exact proof term for the current goal is H1.
We prove the intermediate
claim L2:
X = X ∖ {y}.
We will
prove X ⊆ X ∖ {y}.
Let x be given.
An exact proof term for the current goal is Hx.
Apply H2 to the current goal.
rewrite the current goal using
SingE y x H3 (from right to left).
An exact proof term for the current goal is Hx.
Apply HX to the current goal.
rewrite the current goal using L2 (from left to right).
An exact proof term for the current goal is H1.
∎