Let X, Tx, Y, Ty and K be given.
Let y0 be given.
Let N be given.
We prove the intermediate
claim HNsub:
setprod K {y0} ⊆ N.
We prove the intermediate
claim HNrefine:
∀p ∈ N, ∃b ∈ B, p ∈ b ∧ b ⊆ N.
An
exact proof term for the current goal is
(SepE2 (𝒫 (setprod X Y)) (λU0 : set ⇒ ∀q ∈ U0, ∃b ∈ B, q ∈ b ∧ b ⊆ U0) N HNtop).
We prove the intermediate
claim HUFamSubTx:
UFam ⊆ Tx.
Let U be given.
An
exact proof term for the current goal is
(SepE1 Tx (λU0 : set ⇒ ∃V : set, V ∈ Ty ∧ y0 ∈ V ∧ setprod U0 V ⊆ N) U HU).
We prove the intermediate
claim HKcov:
K ⊆ ⋃ UFam.
Let x be given.
We will
prove x ∈ ⋃ UFam.
Set p to be the term (x,y0).
We prove the intermediate
claim HpK:
p ∈ setprod K {y0}.
We prove the intermediate
claim HpN:
p ∈ N.
An exact proof term for the current goal is (HNsub p HpK).
We prove the intermediate
claim Hrect:
∃b ∈ B, p ∈ b ∧ b ⊆ N.
An exact proof term for the current goal is (HNrefine p HpN).
Apply Hrect to the current goal.
Let b be given.
Assume Hbpair.
We prove the intermediate
claim HbB:
b ∈ B.
An
exact proof term for the current goal is
(andEL (b ∈ B) (p ∈ b ∧ b ⊆ N) Hbpair).
We prove the intermediate
claim Hbprop:
p ∈ b ∧ b ⊆ N.
An
exact proof term for the current goal is
(andER (b ∈ B) (p ∈ b ∧ b ⊆ N) Hbpair).
We prove the intermediate
claim Hpb:
p ∈ b.
An
exact proof term for the current goal is
(andEL (p ∈ b) (b ⊆ N) Hbprop).
We prove the intermediate
claim HbsubN:
b ⊆ N.
An
exact proof term for the current goal is
(andER (p ∈ b) (b ⊆ N) Hbprop).
Let U0 be given.
Let V0 be given.
We prove the intermediate
claim HpUV:
p ∈ setprod U0 V0.
rewrite the current goal using HbEq (from right to left) at position 1.
An exact proof term for the current goal is Hpb.
We prove the intermediate
claim HpXY0:
p ∈ setprod {x} {y0}.
We prove the intermediate
claim Hcoords:
x ∈ U0 ∧ y0 ∈ V0.
An
exact proof term for the current goal is
(setprod_coords_in x y0 U0 V0 p HpXY0 HpUV).
We prove the intermediate
claim HxU0:
x ∈ U0.
An
exact proof term for the current goal is
(andEL (x ∈ U0) (y0 ∈ V0) Hcoords).
We prove the intermediate
claim HyV0:
y0 ∈ V0.
An
exact proof term for the current goal is
(andER (x ∈ U0) (y0 ∈ V0) Hcoords).
We prove the intermediate
claim HrectSub:
setprod U0 V0 ⊆ N.
rewrite the current goal using HbEq (from right to left) at position 1.
An exact proof term for the current goal is HbsubN.
We prove the intermediate
claim HU0Fam:
U0 ∈ UFam.
Apply (SepI Tx (λU1 : set ⇒ ∃V1 : set, V1 ∈ Ty ∧ y0 ∈ V1 ∧ setprod U1 V1 ⊆ N) U0 HU0Tx) to the current goal.
We use V0 to witness the existential quantifier.
An
exact proof term for the current goal is
(andI (V0 ∈ Ty ∧ y0 ∈ V0) (setprod U0 V0 ⊆ N) (andI (V0 ∈ Ty) (y0 ∈ V0) HV0Ty HyV0) HrectSub).
An
exact proof term for the current goal is
(UnionI UFam x U0 HxU0 HU0Fam).
We prove the intermediate
claim HKsubX':
K ⊆ X.
An exact proof term for the current goal is HKsubX.
An
exact proof term for the current goal is
(HKcover_prop UFam (andI (UFam ⊆ Tx) (K ⊆ ⋃ UFam) HUFamSubTx HKcov)).
Apply Hfin to the current goal.
Let G be given.
We prove the intermediate
claim HGsub:
G ⊆ UFam.
We prove the intermediate
claim HGfin:
finite G.
We prove the intermediate
claim HKcovG:
K ⊆ ⋃ G.
An
exact proof term for the current goal is
(andER (G ⊆ UFam ∧ finite G) (K ⊆ ⋃ G) HGtriple).
Set pickV to be the term
λU : set ⇒ Eps_i (λV : set ⇒ V ∈ Ty ∧ y0 ∈ V ∧ setprod U V ⊆ N).
We prove the intermediate
claim HpickV:
∀U : set, U ∈ UFam → pickV U ∈ Ty ∧ y0 ∈ pickV U ∧ setprod U (pickV U) ⊆ N.
Let U be given.
We prove the intermediate
claim Hex:
∃V : set, V ∈ Ty ∧ y0 ∈ V ∧ setprod U V ⊆ N.
An
exact proof term for the current goal is
(SepE2 Tx (λU0 : set ⇒ ∃V : set, V ∈ Ty ∧ y0 ∈ V ∧ setprod U0 V ⊆ N) U HU).
Apply Hex to the current goal.
Let V0 be given.
An
exact proof term for the current goal is
(Eps_i_ax (λV : set ⇒ V ∈ Ty ∧ y0 ∈ V ∧ setprod U V ⊆ N) V0 HV0).
Set VFam to be the term
{pickV U|U ∈ G}.
We prove the intermediate
claim HVFamFin:
finite VFam.
An
exact proof term for the current goal is
(Repl_finite (λU : set ⇒ pickV U) G HGfin).
We prove the intermediate
claim HVFamPow:
VFam ∈ 𝒫 Ty.
Apply PowerI Ty VFam to the current goal.
Let V0 be given.
Apply (ReplE_impred G (λU0 : set ⇒ pickV U0) V0 HV0) to the current goal.
Let U0 be given.
We prove the intermediate
claim HU0Fam:
U0 ∈ UFam.
An exact proof term for the current goal is (HGsub U0 HU0G).
We prove the intermediate
claim Hprop:
pickV U0 ∈ Ty ∧ y0 ∈ pickV U0 ∧ setprod U0 (pickV U0) ⊆ N.
An exact proof term for the current goal is (HpickV U0 HU0Fam).
We prove the intermediate
claim Hab:
pickV U0 ∈ Ty.
An
exact proof term for the current goal is
(andEL (pickV U0 ∈ Ty) (y0 ∈ pickV U0) (andEL (pickV U0 ∈ Ty ∧ y0 ∈ pickV U0) (setprod U0 (pickV U0) ⊆ N) Hprop)).
rewrite the current goal using HV0eq (from left to right).
An exact proof term for the current goal is Hab.
We prove the intermediate
claim HVinTy:
V ∈ Ty.
We prove the intermediate
claim Hy0V:
y0 ∈ V.
We prove the intermediate
claim Hall:
∀W : set, W ∈ VFam → y0 ∈ W.
Let W be given.
Apply (ReplE_impred G (λU0 : set ⇒ pickV U0) W HW) to the current goal.
Let U0 be given.
We prove the intermediate
claim HU0Fam:
U0 ∈ UFam.
An exact proof term for the current goal is (HGsub U0 HU0G).
We prove the intermediate
claim Hprop:
pickV U0 ∈ Ty ∧ y0 ∈ pickV U0 ∧ setprod U0 (pickV U0) ⊆ N.
An exact proof term for the current goal is (HpickV U0 HU0Fam).
We prove the intermediate
claim Hab:
y0 ∈ pickV U0.
An
exact proof term for the current goal is
(andER (pickV U0 ∈ Ty) (y0 ∈ pickV U0) (andEL (pickV U0 ∈ Ty ∧ y0 ∈ pickV U0) (setprod U0 (pickV U0) ⊆ N) Hprop)).
rewrite the current goal using HWeq (from left to right).
An exact proof term for the current goal is Hab.
An
exact proof term for the current goal is
(SepI Y (λy : set ⇒ ∀W : set, W ∈ VFam → y ∈ W) y0 Hy0Y Hall).
We prove the intermediate
claim HVsubN:
setprod K V ⊆ N.
Let p be given.
We prove the intermediate
claim Hp0:
p 0 ∈ K.
An
exact proof term for the current goal is
(ap0_Sigma K (λ_ : set ⇒ V) p Hp).
We prove the intermediate
claim Hp1:
p 1 ∈ V.
An
exact proof term for the current goal is
(ap1_Sigma K (λ_ : set ⇒ V) p Hp).
We prove the intermediate
claim HpEta:
p = (p 0,p 1).
An
exact proof term for the current goal is
(setprod_eta K V p Hp).
We prove the intermediate
claim Hp0InUnion:
p 0 ∈ ⋃ G.
An
exact proof term for the current goal is
(HKcovG (p 0) Hp0).
Let U0 be given.
We prove the intermediate
claim HU0Fam:
U0 ∈ UFam.
An exact proof term for the current goal is (HGsub U0 HU0G).
We prove the intermediate
claim Hprop:
pickV U0 ∈ Ty ∧ y0 ∈ pickV U0 ∧ setprod U0 (pickV U0) ⊆ N.
An exact proof term for the current goal is (HpickV U0 HU0Fam).
We prove the intermediate
claim HrectSubN:
setprod U0 (pickV U0) ⊆ N.
An
exact proof term for the current goal is
(andER (pickV U0 ∈ Ty ∧ y0 ∈ pickV U0) (setprod U0 (pickV U0) ⊆ N) Hprop).
We prove the intermediate
claim Hp1Pick:
p 1 ∈ pickV U0.
We prove the intermediate
claim Hp1All:
∀W : set, W ∈ VFam → p 1 ∈ W.
An
exact proof term for the current goal is
(SepE2 Y (λy : set ⇒ ∀W : set, W ∈ VFam → y ∈ W) (p 1) Hp1).
We prove the intermediate
claim Hmem:
pickV U0 ∈ VFam.
An
exact proof term for the current goal is
(ReplI G (λU1 : set ⇒ pickV U1) U0 HU0G).
An exact proof term for the current goal is (Hp1All (pickV U0) Hmem).
We prove the intermediate
claim HpairIn:
(p 0,p 1) ∈ setprod U0 (pickV U0).
We prove the intermediate
claim HpN:
(p 0,p 1) ∈ N.
An
exact proof term for the current goal is
(HrectSubN (p 0,p 1) HpairIn).
rewrite the current goal using HpEta (from left to right).
An exact proof term for the current goal is HpN.
We use V to witness the existential quantifier.
An
exact proof term for the current goal is
(andI (V ∈ Ty ∧ y0 ∈ V) (setprod K V ⊆ N) (andI (V ∈ Ty) (y0 ∈ V) HVinTy Hy0V) HVsubN).
∎