Let x be given.
Set U to be the term
X ∖ {x}.
We prove the intermediate
claim HsingSub:
{x} ⊆ X.
We prove the intermediate
claim HUsub:
U ⊆ X.
We prove the intermediate
claim HUprop:
∀y ∈ U, ∃b ∈ B, y ∈ b ∧ b ⊆ U.
Let y be given.
We will
prove ∃b ∈ B, y ∈ b ∧ b ⊆ U.
We prove the intermediate
claim HyX:
y ∈ X.
An
exact proof term for the current goal is
(setminusE1 X {x} y HyU).
We prove the intermediate
claim Hynot:
y ∉ {x}.
An
exact proof term for the current goal is
(setminusE2 X {x} y HyU).
We prove the intermediate
claim Hneq:
¬ (y = x).
Apply Hynot to the current goal.
rewrite the current goal using Heq (from left to right).
An
exact proof term for the current goal is
(SingI x).
We prove the intermediate
claim Hrpos:
Rlt 0 (apply_fun d (y,x)).
Apply andI to the current goal.
We prove the intermediate
claim HrR:
apply_fun d (y,x) ∈ R.
We prove the intermediate
claim HyxIn:
(y,x) ∈ setprod X X.
An exact proof term for the current goal is (Hfun (y,x) HyxIn).
Apply andI to the current goal.
Let z be given.
We prove the intermediate
claim HzX:
z ∈ X.
We prove the intermediate
claim Hznotsing:
z ∉ {x}.
We prove the intermediate
claim Hzeq:
z = x.
An
exact proof term for the current goal is
(SingE x z Hzsing).
rewrite the current goal using Hzeq (from right to left) at position 1.
An exact proof term for the current goal is Hz.
Apply FalseE to the current goal.
An
exact proof term for the current goal is
(setminusI X {x} z HzX Hznotsing).
An
exact proof term for the current goal is
(SepI (𝒫 X) (λU0 : set ⇒ ∀y ∈ U0, ∃b ∈ B, y ∈ b ∧ b ⊆ U0) U (PowerI X U HUsub) HUprop).
An exact proof term for the current goal is HUbasis.
We prove the intermediate
claim Heq:
X ∖ U = {x}.
We prove the intermediate
claim HUdef:
U = X ∖ {x}.
rewrite the current goal using HUdef (from left to right).
rewrite the current goal using Heq (from right to left).
An exact proof term for the current goal is HclosedComp.
∎