Let x be given.
We prove the intermediate
claim HexN:
∃N : set, N ∈ Tx ∧ x ∈ N ∧ ∃S0 : set, finite S0 ∧ S0 ⊆ W ∧ ∀A : set, A ∈ W → A ∩ N ≠ Empty → A ∈ S0.
Apply HexN to the current goal.
Let N be given.
We use N to witness the existential quantifier.
We prove the intermediate
claim HNpair:
N ∈ Tx ∧ x ∈ N.
An
exact proof term for the current goal is
(andEL (N ∈ Tx ∧ x ∈ N) (∃S0 : set, finite S0 ∧ S0 ⊆ W ∧ ∀A : set, A ∈ W → A ∩ N ≠ Empty → A ∈ S0) HNpack).
We prove the intermediate
claim HexS0:
∃S0 : set, finite S0 ∧ S0 ⊆ W ∧ ∀A : set, A ∈ W → A ∩ N ≠ Empty → A ∈ S0.
An
exact proof term for the current goal is
(andER (N ∈ Tx ∧ x ∈ N) (∃S0 : set, finite S0 ∧ S0 ⊆ W ∧ ∀A : set, A ∈ W → A ∩ N ≠ Empty → A ∈ S0) HNpack).
Apply andI to the current goal.
An exact proof term for the current goal is HNpair.
Apply HexS0 to the current goal.
Let S0 be given.
Set S to be the term
{f w|w ∈ S0}.
We use S to witness the existential quantifier.
Apply andI to the current goal.
Apply andI to the current goal.
We prove the intermediate
claim HS0fin:
finite S0.
An
exact proof term for the current goal is
(Repl_finite (λw0 : set ⇒ f w0) S0 HS0fin).
Let y be given.
Apply (ReplE_impred S0 (λw0 : set ⇒ f w0) y Hy (y ∈ {f w|w ∈ W})) to the current goal.
Let w be given.
rewrite the current goal using Heq (from left to right).
We prove the intermediate
claim HS0subW:
S0 ⊆ W.
An
exact proof term for the current goal is
(ReplI W (λw0 : set ⇒ f w0) w (HS0subW w HwS0)).
Let A be given.
Apply (ReplE_impred W (λw0 : set ⇒ f w0) A HA (A ∈ S)) to the current goal.
Let w be given.
We prove the intermediate
claim HAsubw:
A ⊆ w.
rewrite the current goal using HeqA (from left to right).
An exact proof term for the current goal is (Hsub w HwW).
We prove the intermediate
claim HwN:
w ∩ N ≠ Empty.
We prove the intermediate
claim Hexz:
∃z : set, z ∈ A ∩ N.
Apply Hexz to the current goal.
Let z be given.
We prove the intermediate
claim HzA:
z ∈ A.
An
exact proof term for the current goal is
(binintersectE1 A N z Hz).
We prove the intermediate
claim HzN:
z ∈ N.
An
exact proof term for the current goal is
(binintersectE2 A N z Hz).
We prove the intermediate
claim Hzw:
z ∈ w.
An exact proof term for the current goal is (HAsubw z HzA).
We prove the intermediate
claim HwS0:
w ∈ S0.
An
exact proof term for the current goal is
(andER (finite S0 ∧ S0 ⊆ W) (∀A0 : set, A0 ∈ W → A0 ∩ N ≠ Empty → A0 ∈ S0) HS0 w HwW HwN).
rewrite the current goal using HeqA (from left to right).
An
exact proof term for the current goal is
(ReplI S0 (λw0 : set ⇒ f w0) w HwS0).
∎