Let x be given.
Set U to be the term
X ∖ {x}.
We prove the intermediate
claim HUsub:
U ⊆ X.
We prove the intermediate
claim HsingSub:
{x} ⊆ X.
We prove the intermediate
claim Heq:
X ∖ U = {x}.
We prove the intermediate
claim HUdef:
U = X ∖ {x}.
rewrite the current goal using HUdef (from left to right).
rewrite the current goal using Heq (from right to left).
An exact proof term for the current goal is HclosedComp.