Let X, Tx, A, a, b and f be given.
We prove the intermediate
claim HIsubR:
I ⊆ R.
An exact proof term for the current goal is HfRng.
Apply HexgI to the current goal.
Let gI be given.
Assume HgI.
Set inc to be the term
{(y,y)|y ∈ I}.
We use g to witness the existential quantifier.
Apply andI to the current goal.
Let x be given.
We prove the intermediate
claim HAsubX:
A ⊆ X.
We prove the intermediate
claim HxX:
x ∈ X.
An exact proof term for the current goal is (HAsubX x HxA).
rewrite the current goal using
(compose_fun_apply X gI inc x HxX) (from left to right).
Use reflexivity.
rewrite the current goal using Hcomp (from left to right).
We prove the intermediate
claim HgIxI:
apply_fun gI x ∈ I.
rewrite the current goal using HincId (from left to right).
An exact proof term for the current goal is (HgIeq x HxA).
∎