Section extension_approximation.
Variable f0:point_set (SubspaceTopology F) -> point_set RTop.
Hypothesis f0_cont: continuous f0.
Hypothesis f0_bound: forall x:point_set (SubspaceTopology F),
-1 <= f0 x <= 1.
Definition extension_approximation: point_set X -> point_set RTop.
refine (
let F0:=Im [ x:point_set (SubspaceTopology F) | f0 x <= -1/3 ]
(subspace_inc F) in
let G0:=Im [ x:point_set (SubspaceTopology F) | f0 x >= 1/3 ]
(subspace_inc F) in
let g:=proj1_sig (Urysohns_lemma_function F0 G0 _ _ _) in
fun x:point_set X => -1/3 + 2/3 * g x).
- apply subspace_inc_takes_closed_to_closed; [assumption|].
replace ([ x:point_set (SubspaceTopology F) | f0 x <= -1/3 ]) with
(inverse_image f0 [ y:point_set RTop | y <= -1/3 ]).
+ red.
rewrite <- inverse_image_complement.
apply f0_cont.
apply lower_closed_interval_closed.
* apply Rle_order.
* intros.
destruct (total_order_T x y) as [[|]|];
auto with real.
+ extensionality_ensembles.
* now constructor.
* constructor.
now constructor.
- apply subspace_inc_takes_closed_to_closed; [assumption|].
replace ([ x:point_set (SubspaceTopology F) | f0 x >= 1/3 ]) with
(inverse_image f0 [ y:point_set RTop | 1/3 <= y ]).
+ red.
rewrite <- inverse_image_complement.
apply f0_cont.
apply upper_closed_interval_closed.
* apply Rle_order.
* intros.
destruct (total_order_T x y) as [[|]|];
auto with real.
+ extensionality_ensembles.
* constructor. lra.
* constructor. constructor. lra.
- extensionality_ensembles.
destruct x, x0.
simpl in *.
subst.
destruct (proof_irrelevance _ i i0).
lra.
Defined.

Lemma extension_approximation_continuous:
continuous extension_approximation.