Let I, Xi and g be given.
We prove the intermediate
claim HgY:
∀i : set, i ∈ I → g i ∈ Y.
Let i be given.
An exact proof term for the current goal is (HgXi i HiI).
rewrite the current goal using HunionDef (from left to right).
An exact proof term for the current goal is HgiU.
Let p be given.
Let i be given.
rewrite the current goal using Heq (from left to right).
Apply andI to the current goal.
Let i be given.
rewrite the current goal using
(apply_fun_graph I g i HiI) (from left to right).
An exact proof term for the current goal is (HgY i HiI).
Let i be given.
We use (g i) to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is (HgY i HiI).
An
exact proof term for the current goal is
(ReplI I (λi0 : set ⇒ (i0,g i0)) i HiI).
rewrite the current goal using HYdef (from left to right).
Use reflexivity.
rewrite the current goal using HpsDef (from left to right).
Apply andI to the current goal.
Apply andI to the current goal.
An exact proof term for the current goal is Htot.
An exact proof term for the current goal is Hgraph.
Let i be given.
rewrite the current goal using
(apply_fun_graph I g i HiI) (from left to right).
An exact proof term for the current goal is (HgXi i HiI).
∎