We prove the intermediate claim L1: ∀X : set, ∀g h : setset, (xX, g x = h x){0} {g x|xX} = {0} {h x|xX}.
Let X, g and h be given.
Assume H: xX, g x = h x.
We prove the intermediate claim L1a: {g x|xX} = {h x|xX}.
An exact proof term for the current goal is (ReplEq_ext X g h H).
We will prove {0} {g x|xX} = {0} {h x|xX}.
rewrite the current goal using L1a (from left to right).
Use reflexivity.
An exact proof term for the current goal is (In_rec_i_eq (λX f ⇒ {0} {f x|xX}) L1).