Skip to content

Commit 1c0b3be

Browse files
authored
fixes #1131 (#1132)
* fixes #1131
1 parent fbe7bd1 commit 1c0b3be

File tree

5 files changed

+26
-23
lines changed

5 files changed

+26
-23
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
+ `sigma_finite_measure` instance on product measure `\x`
1515

1616
### Changed
17-
17+
18+
- in `topology.v`:
19+
+ lemmas `nbhsx_ballx` and `near_ball` take a parameter of type `R` instead of `{posnum R}`
20+
1821
### Renamed
1922

2023
### Generalized

theories/derive.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ Qed.
671671
Lemma linear_lipschitz (V' W' : normedModType R) (f : {linear V' -> W'}) :
672672
continuous f -> exists2 k, k > 0 & forall x, `|f x| <= k * `|x|.
673673
Proof.
674-
move=> /(_ 0); rewrite linear0 => /(_ _ (nbhsx_ballx 0 1%:pos)).
674+
move=> /(_ 0); rewrite linear0 => /(_ _ (nbhsx_ballx _ _ ltr01)).
675675
move=> /nbhs_ballP [_ /posnumP[e] he]; exists (2 / e%:num) => // x.
676676
have [|xn0] := real_le0P (normr_real x).
677677
by rewrite normr_le0 => /eqP->; rewrite linear0 !normr0 mulr0.
@@ -740,7 +740,7 @@ Lemma bilinear_schwarz (U V' W' : normedModType R)
740740
(f : {bilinear U -> V' -> W'}) : continuous (fun p => f p.1 p.2) ->
741741
exists2 k, k > 0 & forall u v, `|f u v| <= k * `|u| * `|v|.
742742
Proof.
743-
move=> /(_ 0); rewrite linear0r => /(_ _ (nbhsx_ballx 0 1%:pos)).
743+
move=> /(_ 0); rewrite linear0r => /(_ _ (nbhsx_ballx _ _ ltr01)).
744744
move=> /nbhs_ballP [_ /posnumP[e] he]; exists ((2 / e%:num) ^+2) => // u v.
745745
have [|un0] := real_le0P (normr_real u).
746746
by rewrite normr_le0 => /eqP->; rewrite linear0l !normr0 mulr0 mul0r.

theories/lebesgue_measure.v

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,7 @@ have finDn n : mu (Dn n) \is a fin_num.
19501950
by rewrite le_measure// ?inE//=; [exact: mDn|exact: subIsetl].
19511951
have finD : mu D \is a fin_num by rewrite fin_num_abs gee0_abs.
19521952
rewrite -[mu D]fineK// => /fine_cvg/(_ (interior (ball (fine (mu D)) eps)))[].
1953-
exact/nbhs_interior/(nbhsx_ballx _ (PosNum epspos)).
1953+
exact/nbhs_interior/nbhsx_ballx.
19541954
move=> n _ /(_ _ (leqnn n))/interior_subset muDN.
19551955
exists (-n%:R, n%:R)%R; rewrite measureD//=.
19561956
move: muDN; rewrite /ball/= /ereal_ball/= -fineB//=; last exact: finDn.
@@ -2089,9 +2089,7 @@ have mE k n : measurable (E k n).
20892089
have nEcvg x k : exists n, A x -> (~` (E k n)) x.
20902090
case : (pselect (A x)); last by move => ?; exists point.
20912091
move=> Ax; have [] := fptwsg _ Ax (interior (ball (g x) (k.+1%:R^-1))).
2092-
apply: open_nbhs_nbhs; split; first exact: open_interior.
2093-
have ki0 : ((0:R) < k.+1%:R^-1)%R by rewrite invr_gt0.
2094-
rewrite (_ : k.+1%:R^-1 = (PosNum ki0)%:num ) //; exact: nbhsx_ballx.
2092+
by apply: open_nbhs_nbhs; split; [exact: open_interior|exact: nbhsx_ballx].
20952093
move=> N _ Nk; exists N.+1 => _; rewrite /E setC_bigcup => i /= /ltnW Ni.
20962094
apply/not_andP; right; apply/negP; rewrite /h -real_ltNge // distrC.
20972095
by case: (Nk _ Ni) => _/posnumP[?]; apply; exact: ball_norm_center.
@@ -2108,8 +2106,7 @@ have badn' : forall k, exists n, mu (E k n) < ((eps/2) / (2 ^ k.+1)%:R)%:E.
21082106
- by apply: bigcap_measurable => ?.
21092107
case/fine_cvg/(_ (interior (ball (0:R) ek))%R).
21102108
apply: open_nbhs_nbhs; split; first exact: open_interior.
2111-
have ekpos : (0 < ek)%R by rewrite divr_gt0 // divr_gt0.
2112-
by move: ek ekpos => _/posnumP[ek]; exact: nbhsx_ballx.
2109+
by apply: nbhsx_ballx; rewrite !divr_gt0.
21132110
move=> N _ /(_ N (leqnn _))/interior_subset muEN; exists N; move: muEN.
21142111
rewrite /ball /= distrC subr0 ger0_norm // -[x in x < _]fineK ?ge0_fin_numE//.
21152112
by apply:(le_lt_trans _ finA); apply le_measure; rewrite ?inE// => ? [? _ []].

theories/normedtype.v

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ Lemma dnbhs0_le e : 0 < e -> \forall x \near (0 : V)^', `|x| <= e.
18571857
Proof. by move=> e_gt0; apply: cvg_within; apply: nbhs0_le. Qed.
18581858

18591859
Lemma nbhs_norm_ball x (eps : {posnum R}) : nbhs_norm x (ball x eps%:num).
1860-
Proof. rewrite nbhs_nbhs_norm; by apply: nbhsx_ballx. Qed.
1860+
Proof. by rewrite nbhs_nbhs_norm; exact: nbhsx_ballx. Qed.
18611861

18621862
Lemma nbhsDl (P : set V) (x y : V) :
18631863
(\forall z \near (x + y), P z) <-> (\near x, P (x + y)).
@@ -4043,17 +4043,17 @@ have xyab : (edist (x, y) <= edist (x, a) + edist (a, b) + edist (y, b))%E.
40434043
rewrite (edist_sym y b) -addeA.
40444044
by rewrite (le_trans (@edist_triangle _ a _))// ?lee_add// ?edist_triangle.
40454045
have xafin : edist (x, a) \is a fin_num.
4046-
by apply/edist_finP; exists 1 =>//; near: a; apply: (nbhsx_ballx _ 1%:pos).
4046+
by apply/edist_finP; exists 1 =>//; near: a; exact: nbhsx_ballx.
40474047
have ybfin : edist (y, b) \is a fin_num.
4048-
by apply/edist_finP; exists 1 =>//; near: b; apply: (nbhsx_ballx _ 1%:pos).
4048+
by apply/edist_finP; exists 1 =>//; near: b; exact: nbhsx_ballx.
40494049
have abfin : edist (a, b) \is a fin_num.
40504050
by rewrite ge0_fin_numE// (le_lt_trans abxy) ?lte_add_pinfty// -ge0_fin_numE.
40514051
have xyabfin: (edist (x, y) - edist (a, b))%E \is a fin_num
40524052
by rewrite fin_numB abfin efin.
40534053
rewrite -fineB// -fine_abse// -lee_fin fineK ?abse_fin_num//.
40544054
rewrite (@le_trans _ _ (edist (x, a) + edist (y, b))%E)//; last first.
40554055
by rewrite [eps%:num]splitr/= EFinD lee_add//; apply: edist_fin => //=;
4056-
[near: a | near: b]; apply: (nbhsx_ballx _ (_ / _)%:pos).
4056+
[near: a | near: b]; exact: nbhsx_ballx.
40574057
have [ab_le_xy|/ltW xy_le_ab] := leP (edist (a, b)) (edist (x, y)).
40584058
by rewrite gee0_abs ?subre_ge0// lee_subl_addr// addeAC.
40594059
rewrite lee0_abs ?sube_le0// oppeB ?fin_num_adde_defr//.
@@ -4145,7 +4145,7 @@ have fwfin : \forall w \near z, edist_inf w \is a fin_num.
41454145
rewrite fin_numD fz_fin andbT; apply/edist_finP; exists 1 => //.
41464146
exact/ball_sym.
41474147
split => //; apply/cvgrPdist_le => _/posnumP[eps].
4148-
have : nbhs z (ball z eps%:num) by apply: nbhsx_ballx.
4148+
have : nbhs z (ball z eps%:num) by exact: nbhsx_ballx.
41494149
apply: filter_app; near_simpl; move: fwfin; apply: filter_app.
41504150
near=> t => tfin /= /[dup] ?.
41514151
have ztfin : edist (z, t) \is a fin_num by apply/edist_finP; exists eps%:num.
@@ -5614,7 +5614,8 @@ move=> x clAx; have abx : x \in `[a, b].
56145614
by apply: interval_closed; have /closureI [] := clAx.
56155615
split=> //; have /sabUf [i Di fx] := abx.
56165616
have /fop := Di; rewrite openE => /(_ _ fx) [_ /posnumP[e] xe_fi].
5617-
have /clAx [y [[aby [E sD [sayUf _]]] xe_y]] := nbhsx_ballx x e.
5617+
have /clAx [y [[aby [E sD [sayUf _]]] xe_y]] :=
5618+
nbhsx_ballx x e%:num ltac:(by []).
56185619
exists (i |` E)%fset; first by move=> j /fset1UP[->|/sD] //; rewrite inE.
56195620
split=> [z axz|]; last first.
56205621
exists i; first by rewrite /= !inE eq_refl.

theories/topology.v

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5154,13 +5154,13 @@ Lemma ball_triangle (y x z : M) (e1 e2 : R) :
51545154
ball x e1 y -> ball y e2 z -> ball x (e1 + e2) z.
51555155
Proof. exact: PseudoMetric.ball_triangle. Qed.
51565156

5157-
Lemma nbhsx_ballx (x : M) (eps : {posnum R}) : nbhs x (ball x eps%:num).
5158-
Proof. by apply/nbhs_ballP; exists eps%:num => /=. Qed.
5157+
Lemma nbhsx_ballx (x : M) (eps : R) : 0 < eps -> nbhs x (ball x eps).
5158+
Proof. by move=> e0; apply/nbhs_ballP; exists eps. Qed.
51595159

51605160
Lemma open_nbhs_ball (x : M) (eps : {posnum R}) : open_nbhs x ((ball x eps%:num)^°).
51615161
Proof.
51625162
split; first exact: open_interior.
5163-
by apply: nbhs_singleton; apply: nbhs_interior; apply:nbhsx_ballx.
5163+
by apply: nbhs_singleton; apply: nbhs_interior; exact: nbhsx_ballx.
51645164
Qed.
51655165

51665166
Lemma le_ball (x : M) (e1 e2 : R) : e1 <= e2 -> ball x e1 `<=` ball x e2.
@@ -5175,8 +5175,7 @@ apply: Build_ProperFilter; rewrite -entourage_ballE => A [_/posnumP[e] sbeA].
51755175
by exists (point, point); apply: sbeA; apply: ballxx.
51765176
Qed.
51775177

5178-
Lemma near_ball (y : M) (eps : {posnum R}) :
5179-
\forall y' \near y, ball y eps%:num y'.
5178+
Lemma near_ball (y : M) (eps : R) : 0 < eps -> \forall y' \near y, ball y eps y'.
51805179
Proof. exact: nbhsx_ballx. Qed.
51815180

51825181
Lemma dnbhs_ball (a : M) (e : R) : (0 < e)%R -> a^' (ball a e `\ a).
@@ -5234,6 +5233,9 @@ End pseudoMetricType_numDomainType.
52345233
#[global] Hint Resolve close_refl : core.
52355234
Arguments close_cvg {T} F1 F2 {FF2} _.
52365235

5236+
Arguments nbhsx_ballx {R M} x eps.
5237+
Arguments near_ball {R M} y eps.
5238+
52375239
#[deprecated(since="mathcomp-analysis 0.6.0", note="renamed `cvg_ball`")]
52385240
Notation app_cvg_locally := cvg_ball (only parsing).
52395241

@@ -6252,10 +6254,10 @@ Lemma Rhausdorff (R : realFieldType) : hausdorff_space R.
62526254
Proof.
62536255
move=> x y clxy; apply/eqP; rewrite eq_le.
62546256
apply/in_segment_addgt0Pr => _ /posnumP[e].
6255-
rewrite in_itv /= -ler_distl; set he := (e%:num / 2)%:pos.
6256-
have [z [zx_he yz_he]] := clxy _ _ (nbhsx_ballx x he) (nbhsx_ballx y he).
6257+
rewrite in_itv /= -ler_distl; have he : 0 < (e%:num / 2) by [].
6258+
have [z [zx_he yz_he]] := clxy _ _ (nbhsx_ballx x _ he) (nbhsx_ballx y _ he).
62576259
have := ball_triangle yz_he (ball_sym zx_he).
6258-
by rewrite -mulr2n -mulr_natr divfK // => /ltW.
6260+
by rewrite -mulr2n -(mulr_natr (_ / _) 2) divfK// => /ltW.
62596261
Qed.
62606262

62616263
Section RestrictedUniformTopology.

0 commit comments

Comments
 (0)