Let X, Tx, Y, Ty and f be given.
We prove the intermediate
claim Hpreimg:
∀V : set, V ∈ Ty → preimage_of X f V ∈ Tx.
Let C be given.
We prove the intermediate
claim Hright:
C ⊆ Y ∧ ∃U ∈ Ty, C = Y ∖ U.
We prove the intermediate
claim HCsub:
C ⊆ Y.
An
exact proof term for the current goal is
(andEL (C ⊆ Y) (∃U ∈ Ty, C = Y ∖ U) Hright).
We prove the intermediate
claim HU:
∃U ∈ Ty, C = Y ∖ U.
An
exact proof term for the current goal is
(andER (C ⊆ Y) (∃U ∈ Ty, C = Y ∖ U) Hright).
Apply HU to the current goal.
Let U be given.
Assume HU.
Apply HU to the current goal.
Apply andI to the current goal.
An exact proof term for the current goal is HTx.
Apply andI to the current goal.
Let x be given.
An
exact proof term for the current goal is
(SepE1 X (λx ⇒ apply_fun f x ∈ C) x Hx).
We use
(preimage_of X f U) to
witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is (Hpreimg U HUTy).
rewrite the current goal using HCeq (from left to right).
Let x be given.
An exact proof term for the current goal is HxX.
Assume _.
An exact proof term for the current goal is (HfxU HfxU2).
Let x be given.
Apply SepI to the current goal.
An exact proof term for the current goal is HxX.
An exact proof term for the current goal is (Hf x HxX).
We prove the intermediate
claim Hxpre2:
x ∈ preimage_of X f U.
An
exact proof term for the current goal is
(SepI X (λx ⇒ apply_fun f x ∈ U) x HxX HfxU).
An exact proof term for the current goal is (Hxpre Hxpre2).
∎