Let x be given.
We prove the intermediate
claim HxS:
x ∈ {a}.
rewrite the current goal using HX (from right to left).
An exact proof term for the current goal is HxX.
We prove the intermediate
claim Hxa:
x = a.
An
exact proof term for the current goal is
(SingE a x HxS).
rewrite the current goal using Hxa (from left to right).
An
exact proof term for the current goal is
(UnionI {U} a U HaU (SingI U)).