Let X, Tx, Y, Ty and f be given.
We prove the intermediate
claim Hfunf:
function_on f X Y.
Apply Hexg to the current goal.
Let g be given.
Assume Hgpack.
Apply HexB to the current goal.
Let B be given.
An exact proof term for the current goal is HBpack.
We prove the intermediate
claim HBasis:
basis_on Y B.
Set F to be the term
λb : set ⇒ preimage_of X f b of type
set → set.
Set Bx to be the term
{F b|b ∈ B}.
We prove the intermediate
claim HBxSub:
∀c ∈ Bx, c ∈ Tx.
Let c be given.
Let b be given.
rewrite the current goal using Hceq (from left to right).
We prove the intermediate
claim HbsubY:
b ⊆ Y.
We prove the intermediate
claim HbPow:
b ∈ 𝒫 Y.
An
exact proof term for the current goal is
(PowerI Y b HbsubY).
We prove the intermediate
claim HbTy:
b ∈ Ty.
rewrite the current goal using HgenEq (from right to left).
An exact proof term for the current goal is HbGen.
We prove the intermediate
claim HBxRef:
∀U ∈ Tx, ∀x ∈ U, ∃Cx ∈ Bx, x ∈ Cx ∧ Cx ⊆ U.
Let U be given.
Let x be given.
We prove the intermediate
claim HUsubX:
U ⊆ X.
We prove the intermediate
claim HxX:
x ∈ X.
An exact proof term for the current goal is (HUsubX x HxU).
We prove the intermediate
claim HVopenTy:
Vopen ∈ Ty.
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
An exact proof term for the current goal is (Hgf x HxX).
We prove the intermediate
claim HfxVopen:
apply_fun f x ∈ Vopen.
rewrite the current goal using Hfxx (from left to right).
An exact proof term for the current goal is HxU.
rewrite the current goal using HgenEq (from left to right).
An exact proof term for the current goal is HVopenTy.
We prove the intermediate
claim Hlocal:
∃b ∈ B, apply_fun f x ∈ b ∧ b ⊆ Vopen.
Apply Hlocal to the current goal.
Let b be given.
Assume Hbpack.
We prove the intermediate
claim HbB:
b ∈ B.
An
exact proof term for the current goal is
(andEL (b ∈ B) (apply_fun f x ∈ b ∧ b ⊆ Vopen) Hbpack).
We prove the intermediate
claim Hbrest:
apply_fun f x ∈ b ∧ b ⊆ Vopen.
An
exact proof term for the current goal is
(andER (b ∈ B) (apply_fun f x ∈ b ∧ b ⊆ Vopen) Hbpack).
We prove the intermediate
claim Hfxb:
apply_fun f x ∈ b.
An
exact proof term for the current goal is
(andEL (apply_fun f x ∈ b) (b ⊆ Vopen) Hbrest).
We prove the intermediate
claim HbsubV:
b ⊆ Vopen.
An
exact proof term for the current goal is
(andER (apply_fun f x ∈ b) (b ⊆ Vopen) Hbrest).
We use Cx to witness the existential quantifier.
We will
prove Cx ∈ Bx ∧ (x ∈ Cx ∧ Cx ⊆ U).
Apply andI to the current goal.
An
exact proof term for the current goal is
(ReplI B F b HbB).
Apply andI to the current goal.
An
exact proof term for the current goal is
(SepI X (λx0 : set ⇒ apply_fun f x0 ∈ b) x HxX Hfxb).
Let z be given.
We prove the intermediate
claim HzX:
z ∈ X.
An
exact proof term for the current goal is
(SepE1 X (λx0 : set ⇒ apply_fun f x0 ∈ b) z Hz).
We prove the intermediate
claim Hfz:
apply_fun f z ∈ b.
An
exact proof term for the current goal is
(SepE2 X (λx0 : set ⇒ apply_fun f x0 ∈ b) z Hz).
We prove the intermediate
claim HfzV:
apply_fun f z ∈ Vopen.
An
exact proof term for the current goal is
(HbsubV (apply_fun f z) Hfz).
rewrite the current goal using (Hgf z HzX) (from right to left).
An exact proof term for the current goal is HgFzU.
Apply andI to the current goal.
An exact proof term for the current goal is HTx.
We use Bx to witness the existential quantifier.
Apply andI to the current goal.
Apply andI to the current goal.
An exact proof term for the current goal is HBxCount.
An exact proof term for the current goal is HBasisGen.
∎