Skip to content

Commit 5c86651

Browse files
committed
Remove duplicated lemmas and dependency to Rstruct
1 parent d64e9df commit 5c86651

File tree

2 files changed

+14
-77
lines changed

2 files changed

+14
-77
lines changed

theories/normedtype.v

Lines changed: 13 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ From mathcomp Require Import all_ssreflect ssralg ssrint ssrnum finmap matrix.
44
From mathcomp Require Import rat interval zmodp vector fieldext falgebra.
55
From mathcomp Require Import boolp classical_sets functions.
66
From mathcomp Require Import archimedean.
7-
From mathcomp Require Import cardinality set_interval Rstruct.
7+
From mathcomp Require Import cardinality set_interval.
88
Require Import ereal reals signed topology prodnormedzmodule function_spaces.
99
Require Export separation_axioms.
1010

@@ -1101,74 +1101,6 @@ Arguments cvgr0_norm_le {_ _ _ F FF}.
11011101
note="use `cvgrPdist_lt` or a variation instead")]
11021102
Notation cvg_distP := fcvgrPdist_lt (only parsing).
11031103

1104-
(* NB: the following section used to be in Rstruct.v *)
1105-
Require Rstruct.
1106-
1107-
Section analysis_struct.
1108-
1109-
Import Rdefinitions.
1110-
Import Rstruct.
1111-
1112-
(* TODO: express using ball?*)
1113-
Lemma continuity_pt_nbhs (f : R -> R) x :
1114-
Ranalysis1.continuity_pt f x <->
1115-
forall eps : {posnum R}, nbhs x (fun u => `|f u - f x| < eps%:num).
1116-
Proof.
1117-
split=> [fcont e|fcont _/RltP/posnumP[e]]; last first.
1118-
have [_/posnumP[d] xd_fxe] := fcont e.
1119-
exists d%:num; split; first by apply/RltP; have := [gt0 of d%:num].
1120-
by move=> y [_ /RltP yxd]; apply/RltP/xd_fxe; rewrite /= distrC.
1121-
have /RltP egt0 := [gt0 of e%:num].
1122-
have [_ [/RltP/posnumP[d] dx_fxe]] := fcont e%:num egt0.
1123-
exists d%:num => //= y xyd; case: (eqVneq x y) => [->|xney].
1124-
by rewrite subrr normr0.
1125-
apply/RltP/dx_fxe; split; first by split=> //; apply/eqP.
1126-
by have /RltP := xyd; rewrite distrC.
1127-
Qed.
1128-
1129-
Lemma continuity_pt_cvg (f : R -> R) (x : R) :
1130-
Ranalysis1.continuity_pt f x <-> {for x, continuous f}.
1131-
Proof.
1132-
eapply iff_trans; first exact: continuity_pt_nbhs.
1133-
apply iff_sym.
1134-
have FF : Filter (f @ x).
1135-
by typeclasses eauto.
1136-
(*by apply fmap_filter; apply: @filter_filter (locally_filter _).*)
1137-
case: (@fcvg_ballP _ _ (f @ x) FF (f x)) => {FF}H1 H2.
1138-
(* TODO: in need for lemmas and/or refactoring of already existing lemmas (ball vs. Rabs) *)
1139-
split => [{H2} - /H1 {}H1 eps|{H1} H].
1140-
- have {H1} [//|_/posnumP[x0] Hx0] := H1 eps%:num.
1141-
exists x0%:num => //= Hx0' /Hx0 /=.
1142-
by rewrite /= distrC; apply.
1143-
- apply H2 => _ /posnumP[eps]; move: (H eps) => {H} [_ /posnumP[x0] Hx0].
1144-
exists x0%:num => //= y /Hx0 /= {}Hx0.
1145-
by rewrite /ball /= distrC.
1146-
Qed.
1147-
1148-
Lemma continuity_ptE (f : R -> R) (x : R) :
1149-
Ranalysis1.continuity_pt f x <-> {for x, continuous f}.
1150-
Proof. exact: continuity_pt_cvg. Qed.
1151-
1152-
Local Open Scope classical_set_scope.
1153-
1154-
Lemma continuity_pt_cvg' f x :
1155-
Ranalysis1.continuity_pt f x <-> f @ x^' --> f x.
1156-
Proof. by rewrite continuity_ptE continuous_withinNx. Qed.
1157-
1158-
Lemma continuity_pt_dnbhs f x :
1159-
Ranalysis1.continuity_pt f x <->
1160-
forall eps, 0 < eps -> x^' (fun u => `|f x - f u| < eps).
1161-
Proof.
1162-
rewrite continuity_pt_cvg' (@cvgrPdist_lt _ [the normedModType _ of R^o]).
1163-
exact.
1164-
Qed.
1165-
1166-
Lemma nbhs_pt_comp (P : R -> Prop) (f : R -> R) (x : R) :
1167-
nbhs (f x) P -> Ranalysis1.continuity_pt f x -> \near x, P (f x).
1168-
Proof. by move=> Lf /continuity_pt_cvg; apply. Qed.
1169-
1170-
End analysis_struct.
1171-
11721104
Section nbhs_lt_le.
11731105
Context {R : realType}.
11741106
Implicit Types x z : R.
@@ -3708,16 +3640,17 @@ exists (Uniform.class T'), ([set xy | ball (f xy.1) 1 (f xy.2)]); split.
37083640
Qed.
37093641

37103642
Section normalP.
3711-
Context {T : topologicalType}.
3643+
Context {R : realType} {T : topologicalType}.
37123644

3645+
(* Ideally, R should be an instance of realType here,
3646+
rather than a section variable. *)
37133647
Let normal_spaceP : [<->
37143648
(* 0 *) normal_space T;
37153649
(* 1 *) forall (A B : set T), closed A -> closed B -> A `&` B = set0 ->
37163650
uniform_separator A B;
37173651
(* 2 *) forall (A B : set T), closed A -> closed B -> A `&` B = set0 ->
37183652
exists U V, [/\ open U, open V, A `<=` U, B `<=` V & U `&` V = set0] ].
37193653
Proof.
3720-
pose R := Rdefinitions.R.
37213654
tfae; first by move=> ?; exact: normal_uniform_separator.
37223655
- move=> + A B clA clB AB0 => /(_ _ _ clA clB AB0) /(@uniform_separatorP _ R).
37233656
case=> f [cf f01 /imsub1P/subset_trans fa0 /imsub1P/subset_trans fb1].
@@ -3755,25 +3688,29 @@ End normalP.
37553688

37563689
Section completely_regular.
37573690

3758-
Definition completely_regular_space {R : realType} {T : topologicalType} :=
3691+
Context {R : realType}.
3692+
3693+
Definition completely_regular_space {T : topologicalType} :=
37593694
forall (a : T) (B : set T), closed B -> ~ B a -> exists f : T -> R, [/\
37603695
continuous f,
37613696
f a = 0 &
37623697
f @` B `<=` [set 1] ].
37633698

3699+
(* Ideally, R should be an instance of realType here,
3700+
rather than a section variable. *)
37643701
Lemma point_uniform_separator {T : uniformType} (x : T) (B : set T) :
37653702
closed B -> ~ B x -> uniform_separator [set x] B.
37663703
Proof.
37673704
move=> clB nBx; have : open (~` B) by rewrite openC.
37683705
rewrite openE => /(_ _ nBx); rewrite /interior /= -nbhs_entourageE.
37693706
case=> E entE EnB.
3770-
pose T' := [the pseudoMetricType Rdefinitions.R of gauge.type entE].
3707+
pose T' : pseudoMetricType R := gauge.type entE.
37713708
exists (Uniform.class T); exists E; split => //; last by move => ?.
37723709
by rewrite -subset0 => -[? w [/= [-> ? /xsectionP ?]]]; exact: (EnB w).
37733710
Qed.
37743711

3775-
Lemma uniform_completely_regular {R : realType} {T : uniformType} :
3776-
@completely_regular_space R T.
3712+
Lemma uniform_completely_regular {T : uniformType} :
3713+
@completely_regular_space T.
37773714
Proof.
37783715
move=> x B clB Bx.
37793716
have /(@uniform_separatorP _ R) [f] := point_uniform_separator clB Bx.
@@ -3815,7 +3752,7 @@ Qed.
38153752
Lemma pseudometric_normal {R : realType} {X : pseudoMetricType R} :
38163753
normal_space X.
38173754
Proof.
3818-
apply/normal_openP => A B clA clB AB0.
3755+
apply/(@normal_openP R) => A B clA clB AB0.
38193756
have eps' (D : set X) : closed D -> forall x, exists eps : {posnum R}, ~ D x ->
38203757
ball x eps%:num `&` D = set0.
38213758
move=> clD x; have [nDx|?] := pselect (~ D x); last by exists 1%:pos.

theories/numfun.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ Lemma urysohn_ext_itv A B x y :
480480
f @` A `<=` [set x], f @` B `<=` [set y] & range f `<=` `[x, y]].
481481
Proof.
482482
move=> cA cB A0 xy; move/normal_separatorP : normalX => urysohn_ext.
483-
have /(@uniform_separatorP _ R)[f [cf f01 f0 f1]] := urysohn_ext _ _ cA cB A0.
483+
have /(@uniform_separatorP _ R)[f [cf f01 f0 f1]] := urysohn_ext R _ _ cA cB A0.
484484
pose g : X -> R := line_path x y \o f; exists g; split; rewrite /g /=.
485485
move=> t; apply: continuous_comp; first exact: cf.
486486
apply: (@continuousD R R^o).

0 commit comments

Comments
 (0)