Section Urysohns_Lemma_construction.
Variable X:TopologicalSpace.
Variable normal_sep_fun: forall F U:Ensemble (point_set X),
closed F -> open U -> Included F U ->
{ V:Ensemble (point_set X) | open V /\ Included F V /\
Included (closure V) U }.
Variable U0 U1:Ensemble (point_set X).
Hypothesis U0_open: open U0.
Hypothesis U1_open: open U1.
Hypothesis U0_in_U1: Included (closure U0) U1.
Definition Un (n:nat) : Ensemble (point_set X) :=
match n with
| O => U0
| S O => U1
| S (S _) => Full_set
end.
Definition expand_U_dyadic (f:nat->Ensemble (point_set X))
(Hopen: forall n:nat, open (f n))
(Hincr: forall n:nat, Included (closure (f n)) (f (S n)))
(n:nat) : Ensemble (point_set X) :=
if (even_odd_dec n) then f (div2 n) else
let m := div2 n in proj1_sig
(normal_sep_fun (closure (f m)) (f (S m))
(closure_closed _) (Hopen _) (Hincr _)).
Definition packaged_expand_U_dyadic :
{ f:nat->Ensemble (point_set X) |
(forall m:nat, open (f m)) /\
(forall m:nat, Included (closure (f m)) (f (S m))) } ->
{ f:nat->Ensemble (point_set X) |
(forall m:nat, open (f m)) /\
(forall m:nat, Included (closure (f m)) (f (S m))) }.
refine (fun fsig => match fsig with
| exist f (conj Hopen Hincr as a) => exist _ (expand_U_dyadic f Hopen Hincr) _
end).
destruct a.
split.
- apply expand_U_dyadic_open.
- apply expand_U_dyadic_incr.
Defined.
Definition U_dyadic_level_n (n:nat) :
{ f:nat->Ensemble (point_set X) |
(forall m:nat, open (f m)) /\
(forall m:nat, Included (closure (f m)) (f (S m))) }.
refine (let lev_n := fix lev_n (n:nat) :
{ f:nat->Ensemble (point_set X) |
(forall m:nat, open (f m)) /\
(forall m:nat, Included (closure (f m)) (f (S m))) } :=
match n with
| O => exist _ Un _
| S n' => packaged_expand_U_dyadic (lev_n n')
end in lev_n n).
split.
- apply Un_open.
- apply Un_incr.
Defined.
Definition U_dyadic (x:dyadic_rational) :
Ensemble (point_set X) :=
match x with
| m_over_2_to_n m n => (proj1_sig (U_dyadic_level_n n)) m
end.
Definition Urysohns_Lemma_function : point_set X -> point_set RTop.
refine (fun x:point_set X => proj1_sig (inf
(Add
(Im [ alpha:dyadic_rational | In (U_dyadic alpha) x ]
(fun alpha:dyadic_rational => Q2R (dr2Q alpha)))
1)
_ _)).
- exists 0.
red. intros.
destruct H.
+ destruct H.
destruct x0.
simpl in H0.
rewrite H0.
replace 0 with (Q2R 0) by lra.
cut (Q2R 0 <= Q2R (Z_of_nat m # pos_power2 n));
auto with real.
apply Qle_Rle.
unfold Qle.
simpl.
auto with zarith.
+ destruct H.
lra.
- exists 1.
right.
constructor.
Defined.

Lemma Urysohns_Lemma_function_0: forall x:point_set X,
In U0 x -> Urysohns_Lemma_function x = 0.