1- (* mathcomp analysis (c) 2025 Inria and AIST. License: CeCILL-C. *)
1+ (* mathcomp analysis (c) 2026 Inria and AIST. License: CeCILL-C. *)
22From HB Require Import structures.
33From mathcomp Require Import all_ssreflect finmap ssralg ssrnum ssrint interval.
44From mathcomp Require Import archimedean.
@@ -858,7 +858,7 @@ Unshelve. all: by end_near. Qed.
858858End closure_left_right_open.
859859
860860Section open_itv_subset.
861- Context {R : realType }.
861+ Context {R : realFieldType }.
862862Variables (A : set R) (x : R).
863863
864864Lemma open_itvoo_subset :
884884
885885End open_itv_subset.
886886
887- Lemma dense_set1C {R : realType } (r : R) : dense (~` [set r]).
887+ Lemma dense_set1C {R : realFieldType } (r : R) : dense (~` [set r]).
888888Proof .
889889move=> /= O O0 oO.
890890suff [s Os /eqP sr] : exists2 s, O s & s != r by exists s; split.
@@ -1023,15 +1023,16 @@ Definition nbhs_simpl := (nbhs_simpl,@nbhs_nbhs_norm,@filter_from_norm_nbhs).
10231023End NbhsNorm.
10241024
10251025Section continuous_within_itvP.
1026- Context {R : realType}.
1027- Implicit Type f : R -> R.
1026+ Context {R : realFieldType} {K : numDomainType}
1027+ {U : pseudoMetricNormedZmodType K}.
1028+ Implicit Type f : R -> U.
10281029
10291030Let near_at_left (a : itv_bound R) b f eps : (a < BLeft b)%O -> 0 < eps ->
10301031 {within [set` Interval a (BRight b)], continuous f} ->
10311032 \forall t \near b^'-, `|f b - f t| < eps.
10321033Proof .
10331034move=> ab eps_gt0 cf.
1034- move/continuous_withinNx/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0) : (cf b).
1035+ move/continuous_withinNx/cvgrPdist_lt/(_ _ eps_gt0) : (cf b).
10351036rewrite /dnbhs/= near_withinE !near_simpl /prop_near1 /nbhs/=.
10361037rewrite -nbhs_subspace_in//; last first.
10371038 rewrite /= in_itv/= lexx andbT.
@@ -1050,7 +1051,7 @@ Let near_at_right a (b : itv_bound R) f eps : (BRight a < b)%O -> 0 < eps ->
10501051 \forall t \near a^'+, `|f a - f t| < eps.
10511052Proof .
10521053move=> ab eps_gt0 cf.
1053- move/continuous_withinNx/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0) : (cf a).
1054+ move/continuous_withinNx/cvgrPdist_lt/(_ _ eps_gt0) : (cf a).
10541055rewrite /dnbhs/= near_withinE !near_simpl// /prop_near1 /nbhs/=.
10551056rewrite -nbhs_subspace_in//; last first.
10561057 rewrite /= in_itv/= lexx//=.
@@ -1069,21 +1070,21 @@ Lemma continuous_within_itvP a b f : a < b ->
10691070 [/\ {in `]a, b[, continuous f}, f @ a^'+ --> f a & f @b^'- --> f b].
10701071Proof .
10711072move=> ab; split=> [abf|].
1072- split; [apply/in_continuous_mksetP|apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0 /=..].
1073+ split; [apply/in_continuous_mksetP|apply/cvgrPdist_lt => eps eps_gt0 /=..].
10731074 - rewrite -continuous_open_subspace; last exact: interval_open.
10741075 by move: abf; exact/continuous_subspaceW/subset_itvW.
10751076 - by apply: near_at_right => //; rewrite bnd_simp.
10761077 - by apply: near_at_left => //; rewrite bnd_simp.
10771078case=> ctsoo ctsL ctsR; apply/subspace_continuousP => x /andP[].
10781079rewrite !bnd_simp/= !le_eqVlt => /predU1P[<-{x}|ax] /predU1P[|].
10791080- by move/eqP; rewrite lt_eqF.
1080- - move=> _; apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0 /=.
1081- move/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0): ctsL; rewrite /at_right !near_withinE.
1081+ - move=> _; apply/cvgrPdist_lt => eps eps_gt0 /=.
1082+ move/cvgrPdist_lt/(_ _ eps_gt0): ctsL; rewrite /at_right !near_withinE.
10821083 apply: filter_app; exists (b - a); rewrite /= ?subr_gt0// => c cba + ac.
10831084 have : a <= c by move: ac => /andP[].
10841085 by rewrite le_eqVlt => /predU1P[->|/[swap] /[apply]//]; rewrite subrr normr0.
1085- - move=> ->; apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0 /=.
1086- move/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0): ctsR; rewrite /at_left !near_withinE.
1086+ - move=> ->; apply/cvgrPdist_lt => eps eps_gt0 /=.
1087+ move/cvgrPdist_lt/(_ _ eps_gt0): ctsR; rewrite /at_left !near_withinE.
10871088 apply: filter_app; exists (b - a); rewrite /= ?subr_gt0 // => c cba + ac.
10881089 have : c <= b by move: ac => /andP[].
10891090 by rewrite le_eqVlt => /predU1P[->|/[swap] /[apply]//]; rewrite subrr normr0.
@@ -1093,18 +1094,18 @@ rewrite !bnd_simp/= !le_eqVlt => /predU1P[<-{x}|ax] /predU1P[|].
10931094 by rewrite -open_subsetE; [exact: subset_itvW| exact: interval_open].
10941095Qed .
10951096
1096- Lemma continuous_within_itvcyP a (f : R -> R) :
1097+ Lemma continuous_within_itvcyP a f :
10971098 {within `[a, +oo[, continuous f} <->
10981099 {in `]a, +oo[, continuous f} /\ f x @[x --> a^'+] --> f a.
10991100Proof .
11001101split=> [cf|].
1101- split; [apply/in_continuous_mksetP|apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0 /=].
1102+ split; [apply/in_continuous_mksetP|apply/cvgrPdist_lt => eps eps_gt0 /=].
11021103 - rewrite -continuous_open_subspace; last exact: interval_open.
11031104 by apply: continuous_subspaceW cf => ?; rewrite /= !in_itv !andbT/= => /ltW.
11041105 - by apply: near_at_right => //; rewrite bnd_simp.
11051106move=> [cf fa]; apply/subspace_continuousP => x /andP[].
11061107rewrite bnd_simp/= le_eqVlt => /predU1P[<-{x}|ax] _.
1107- - apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0/=; move/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0) : fa.
1108+ - apply/cvgrPdist_lt => eps eps_gt0/=; move/cvgrPdist_lt/(_ _ eps_gt0) : fa.
11081109 rewrite /at_right !near_withinE; apply: filter_app.
11091110 exists 1%R => //= c c1a /[swap]; rewrite in_itv/= andbT le_eqVlt.
11101111 by move=> /predU1P[->|/[swap]/[apply]//]; rewrite subrr normr0.
@@ -1115,18 +1116,18 @@ rewrite bnd_simp/= le_eqVlt => /predU1P[<-{x}|ax] _.
11151116 by move=> ?/=; rewrite !in_itv/= !andbT; exact: ltW.
11161117Qed .
11171118
1118- Lemma continuous_within_itvNycP b (f : R -> R) :
1119+ Lemma continuous_within_itvNycP b f :
11191120 {within `]-oo, b], continuous f} <->
11201121 {in `]-oo, b[, continuous f} /\ f x @[x --> b^'-] --> f b.
11211122Proof .
11221123split=> [cf|].
1123- split; [apply/in_continuous_mksetP|apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0 /=].
1124+ split; [apply/in_continuous_mksetP|apply/cvgrPdist_lt => eps eps_gt0 /=].
11241125 - rewrite -continuous_open_subspace; last exact: interval_open.
11251126 by apply: continuous_subspaceW cf => ?/=; rewrite !in_itv/=; exact: ltW.
11261127 - by apply: near_at_left => //; rewrite bnd_simp.
11271128move=> [cf fb]; apply/subspace_continuousP => x /andP[_].
11281129rewrite bnd_simp/= le_eqVlt=> /predU1P[->{x}|xb].
1129- - apply/(@ cvgrPdist_lt _ R^o) => eps eps_gt0/=; move/(@ cvgrPdist_lt _ R^o) /(_ _ eps_gt0) : fb.
1130+ - apply/cvgrPdist_lt => eps eps_gt0/=; move/cvgrPdist_lt/(_ _ eps_gt0) : fb.
11301131 rewrite /at_right !near_withinE; apply: filter_app.
11311132 exists 1%R => //= c c1b /[swap]; rewrite in_itv/= le_eqVlt.
11321133 by move=> /predU1P[->|/[swap]/[apply]//]; rewrite subrr normr0.
@@ -1139,7 +1140,8 @@ Qed.
11391140
11401141End continuous_within_itvP.
11411142
1142- Lemma within_continuous_continuous {R : realType} a b (f : R -> R) x : (a < b)%R ->
1143+ Lemma within_continuous_continuous {R : realFieldType} {K : numDomainType}
1144+ {U : pseudoMetricNormedZmodType K} a b (f : R -> U) x : (a < b)%R ->
11431145 {within `[a, b], continuous f} -> x \in `]a, b[ -> {for x, continuous f}.
11441146Proof .
11451147by move=> ab /continuous_within_itvP-/(_ ab)[+ _] /[swap] xab cf; exact.
0 commit comments