Let X, Tx, Y, Ty and f be given.
Apply HmetY to the current goal.
Let dY be given.
We prove the intermediate
claim HdY:
metric_on Y dY.
We prove the intermediate
claim Hfunf:
function_on f X Y.
We prove the intermediate
claim Hinjf:
∀x1 x2 : set, x1 ∈ X → x2 ∈ X → apply_fun f x1 = apply_fun f x2 → x1 = x2.
Apply Hexg to the current goal.
Let g be given.
Assume Hgpack.
We prove the intermediate
claim HdXmetric:
metric_on X dX.
We prove the intermediate
claim Hmdef:
metric_on X dX = (function_on dX (setprod X X) R ∧ (∀x y : set, x ∈ X → y ∈ X → apply_fun dX (x,y) = apply_fun dX (y,x)) ∧ (∀x : set, x ∈ X → apply_fun dX (x,x) = 0) ∧ (∀x y : set, x ∈ X → y ∈ X → ¬ (Rlt (apply_fun dX (x,y)) 0) ∧ (apply_fun dX (x,y) = 0 → x = y)) ∧ (∀x y z : set, x ∈ X → y ∈ X → z ∈ X → ¬ (Rlt (add_SNo (apply_fun dX (x,y)) (apply_fun dX (y,z))) (apply_fun dX (x,z))))).
rewrite the current goal using Hmdef (from left to right).
Apply and5I to the current goal.
rewrite the current goal using HdXdef (from left to right).
Let pq be given.
We prove the intermediate
claim HxX:
(pq 0) ∈ X.
An
exact proof term for the current goal is
(ap0_Sigma X (λ_ : set ⇒ X) pq Hpq).
We prove the intermediate
claim HyX:
(pq 1) ∈ X.
An
exact proof term for the current goal is
(ap1_Sigma X (λ_ : set ⇒ X) pq Hpq).
We prove the intermediate
claim HfxY:
apply_fun f (pq 0) ∈ Y.
An
exact proof term for the current goal is
(Hfunf (pq 0) HxX).
We prove the intermediate
claim HfyY:
apply_fun f (pq 1) ∈ Y.
An
exact proof term for the current goal is
(Hfunf (pq 1) HyX).
Let x and y be given.
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
We prove the intermediate
claim HfyY:
apply_fun f y ∈ Y.
An exact proof term for the current goal is (Hfunf y HyX).
We prove the intermediate
claim HxyIn:
(x,y) ∈ setprod X X.
We prove the intermediate
claim HyxIn:
(y,x) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HxyEq0 (from left to right).
rewrite the current goal using HyxEq0 (from left to right).
rewrite the current goal using
(tuple_2_0_eq x y) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x y) (from left to right).
rewrite the current goal using
(tuple_2_0_eq y x) (from left to right).
rewrite the current goal using
(tuple_2_1_eq y x) (from left to right).
Let x be given.
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
We prove the intermediate
claim HxxIn:
(x,x) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HxxEq0 (from left to right).
rewrite the current goal using
(tuple_2_0_eq x x) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x x) (from left to right).
Let x and y be given.
Apply andI to the current goal.
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
We prove the intermediate
claim HfyY:
apply_fun f y ∈ Y.
An exact proof term for the current goal is (Hfunf y HyX).
We prove the intermediate
claim HxyIn:
(x,y) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HxyEq0 (from left to right).
rewrite the current goal using
(tuple_2_0_eq x y) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x y) (from left to right).
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
We prove the intermediate
claim HfyY:
apply_fun f y ∈ Y.
An exact proof term for the current goal is (Hfunf y HyX).
We prove the intermediate
claim HxyIn:
(x,y) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
Use symmetry.
An exact proof term for the current goal is HxyEq0.
rewrite the current goal using
(tuple_2_0_eq x y) (from right to left) at position 1.
rewrite the current goal using
(tuple_2_1_eq x y) (from right to left) at position 2.
An exact proof term for the current goal is Htmp.
An exact proof term for the current goal is (Hinjf x y HxX HyX HfyEq).
Let x, y and z be given.
We prove the intermediate
claim HfxY:
apply_fun f x ∈ Y.
An exact proof term for the current goal is (Hfunf x HxX).
We prove the intermediate
claim HfyY:
apply_fun f y ∈ Y.
An exact proof term for the current goal is (Hfunf y HyX).
We prove the intermediate
claim HfzY:
apply_fun f z ∈ Y.
An exact proof term for the current goal is (Hfunf z HzX).
We prove the intermediate
claim HxyIn:
(x,y) ∈ setprod X X.
We prove the intermediate
claim HyzIn:
(y,z) ∈ setprod X X.
We prove the intermediate
claim HxzIn:
(x,z) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using HxyEq0 (from left to right).
rewrite the current goal using HyzEq0 (from left to right).
rewrite the current goal using HxzEq0 (from left to right).
rewrite the current goal using
(tuple_2_0_eq x y) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x y) (from left to right).
rewrite the current goal using
(tuple_2_0_eq y z) (from left to right).
rewrite the current goal using
(tuple_2_1_eq y z) (from left to right).
rewrite the current goal using
(tuple_2_0_eq x z) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x z) (from left to right).
We use dX to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is HdXmetric.
Let U be given.
rewrite the current goal using Hmtdef (from right to left).
An exact proof term for the current goal is HU.
We prove the intermediate
claim HBxSub:
∀b ∈ Bx, b ∈ Tx.
Let b be given.
Let x0 be given.
Let r0 be given.
rewrite the current goal using Hbeq (from left to right).
We prove the intermediate
claim Hx0Y:
apply_fun f x0 ∈ Y.
An exact proof term for the current goal is (Hfunf x0 Hx0X).
rewrite the current goal using HTyEq (from right to left).
Let z be given.
We prove the intermediate
claim HzX:
z ∈ X.
We prove the intermediate
claim HxzIn:
(x0,z) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using
(tuple_2_0_eq x0 z) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x0 z) (from left to right).
Use reflexivity.
We prove the intermediate
claim HltX:
Rlt (apply_fun dX (x0,z)) r0.
rewrite the current goal using HdEq (from left to right).
An exact proof term for the current goal is HltY.
An
exact proof term for the current goal is
(open_ballI X dX x0 r0 z HzX HltX).
Let z be given.
We prove the intermediate
claim HzX:
z ∈ X.
An
exact proof term for the current goal is
(open_ballE1 X dX x0 r0 z Hz).
We prove the intermediate
claim HltX:
Rlt (apply_fun dX (x0,z)) r0.
An
exact proof term for the current goal is
(open_ballE2 X dX x0 r0 z Hz).
We prove the intermediate
claim HxzIn:
(x0,z) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using
(tuple_2_0_eq x0 z) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x0 z) (from left to right).
Use reflexivity.
We prove the intermediate
claim HzY:
apply_fun f z ∈ Y.
An exact proof term for the current goal is (Hfunf z HzX).
rewrite the current goal using HdEq (from right to left).
An exact proof term for the current goal is HltX.
rewrite the current goal using HballPre (from right to left).
An exact proof term for the current goal is (Hfiner U HUgen).
Let U be given.
rewrite the current goal using Hmtdef (from left to right).
We prove the intermediate
claim HBasis:
basis_on X Bx.
We will
prove U ∈ {U0 ∈ 𝒫 X|∀x ∈ U0, ∃b ∈ Bx, x ∈ b ∧ b ⊆ U0}.
Apply (SepI (𝒫 X) (λU0 : set ⇒ ∀x : set, x ∈ U0 → ∃b ∈ Bx, x ∈ b ∧ b ⊆ U0) U) to the current goal.
Let x be given.
We prove the intermediate
claim HxX:
x ∈ X.
We prove the intermediate
claim HVTy:
V ∈ Ty.
rewrite the current goal using HTyEq (from left to right).
An exact proof term for the current goal is HVTy.
We prove the intermediate
claim Hy0Y:
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 (Hginv x HxX).
rewrite the current goal using HgfxEq (from left to right).
An exact proof term for the current goal is HxU.
We prove the intermediate
claim Hy0V:
apply_fun f x ∈ V.
Apply Hexr to the current goal.
Let r be given.
We prove the intermediate
claim HrR:
r ∈ R.
We prove the intermediate
claim Hrpos:
Rlt 0 r.
We prove the intermediate
claim HbxInBx:
bx ∈ Bx.
An
exact proof term for the current goal is
(ReplSepI R (λrr : set ⇒ Rlt 0 rr) (λrr : set ⇒ open_ball X dX x rr) r HrR Hrpos).
We prove the intermediate
claim HxInbx:
x ∈ bx.
An
exact proof term for the current goal is
(center_in_open_ball X dX x r HdXmetric HxX Hrpos).
We use bx to witness the existential quantifier.
Apply andI to the current goal.
An exact proof term for the current goal is HbxInBx.
Apply andI to the current goal.
An exact proof term for the current goal is HxInbx.
Let z be given.
We prove the intermediate
claim HzX:
z ∈ X.
An
exact proof term for the current goal is
(open_ballE1 X dX x r z Hz).
We prove the intermediate
claim HltX:
Rlt (apply_fun dX (x,z)) r.
An
exact proof term for the current goal is
(open_ballE2 X dX x r z Hz).
We prove the intermediate
claim HxzIn:
(x,z) ∈ setprod X X.
rewrite the current goal using HdXdef (from left to right).
rewrite the current goal using
(tuple_2_0_eq x z) (from left to right).
rewrite the current goal using
(tuple_2_1_eq x z) (from left to right).
Use reflexivity.
We prove the intermediate
claim HzY:
apply_fun f z ∈ Y.
An exact proof term for the current goal is (Hfunf z HzX).
rewrite the current goal using HdEq (from right to left).
An exact proof term for the current goal is HltX.
We prove the intermediate
claim HfzV:
apply_fun f z ∈ V.
An
exact proof term for the current goal is
(HballSub (apply_fun f z) HfzBall).
rewrite the current goal using (Hginv z HzX) (from right to left).
An exact proof term for the current goal is HgFzU.
∎