Module mathcomp.analysis.normedtype_theory.num_normedtype
From mathcomp Require Import boot order finmap ssralg ssrnum ssrint.From mathcomp Require Import interval interval_inference archimedean rat.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import boolp classical_sets functions.
From mathcomp Require Import cardinality set_interval reals real_interval
topology.
Reserved Notation "f @`[ a , b ]" (format "f @`[ a , b ]").
Reserved Notation "f @`] a , b [" (format "f @`] a , b [").
Reserved Notation "+oo_ R" (at level 3, left associativity, format "+oo_ R").
Reserved Notation "-oo_ R" (at level 3, left associativity, format "-oo_ R").
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
Import numFieldTopology.Exports.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Lemma bound_itvEUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.urysohn
Source code (RSource code : numDomainType) (aSource code bSource code : R) :
((a \in `[a, b]) = (a <= b)) *
((b \in `[a, b]) = (a <= b)) *
((a \in `[a, b[) = (a < b)) *
((b \in `]a, b]) = (a < b)) *
(a \in `[a, +oo[) *
(a \in `]-oo, a]).
Proof.
Notation "f @`[ a , b ]"Source code :=
(`[minr (f a) (f b), maxr (f a) (f b)]) : ring_scope.
Notation "f @`[ a , b ]"Source code :=
(`[minr (f a) (f b), maxr (f a) (f b)]%classic) : classical_set_scope.
Notation "f @`] a , b ["Source code :=
(`](minr (f a) (f b)), (maxr (f a) (f b))[) : ring_scope.
Notation "f @`] a , b ["Source code :=
(`](minr (f a) (f b)), (maxr (f a) (f b))[%classic) : classical_set_scope.
Section image_interval.
Context {RSource code : realDomainType}.
Implicit Types (a b : R) (f : R -> R).
Lemma mono_mem_image_segmentUsed by
- mathcomp.analysis.realfun
Source code aSource code bSource code fSource code : monotonic `[a, b] f ->
{homo f : xSource code / x \in `[a, b] >-> x \in f @`[a, b]}.
Proof.
Lemma mono_mem_image_itvooUsed by
- mathcomp.analysis.realfun
Source code aSource code bSource code fSource code : strict_monotonic `[a, b] f ->
{homo f : xSource code / x \in `]a, b[ >-> x \in f @`]a, b[}.
Proof.
have ltab : a < b by rewrite (itvP xab).
have: f a <= f b by rewrite flt ?bound_itvE ltW.
by case: leP => // fafb _; rewrite in_itv/= !fle ?in_itv/= ?(itvP xab, lexx).
have: f a >= f b by rewrite flt ?bound_itvE ?ltW.
by case: leP => // fafb _; rewrite in_itv/= !fle ?in_itv/= ?(itvP xab, lexx).
Qed.
Lemma mono_surj_image_segmentUsed by
- mathcomp.analysis.realfun
Source code aSource code bSource code fSource code : a <= b ->
monotonic `[a, b] f -> set_surj `[a, b] (f @`[a, b]) f ->
(f @` `[a, b] = f @`[a, b])%classic.
Proof.
Lemma inc_segment_imageSource code aSource code bSource code fSource code : f a <= f b -> f @`[a, b] = `[f a, f b].
Proof.
Lemma dec_segment_imageSource code aSource code bSource code fSource code : f b <= f a -> f @`[a, b] = `[f b, f a].
Proof.
Lemma inc_surj_image_segmentUsed by
- mathcomp.analysis.realfun
Source code aSource code bSource code fSource code : a <= b ->
{in `[a, b] &, {homo f : xSource code ySource code / x <= y}} ->
set_surj `[a, b] `[f a, f b] f ->
f @` `[a, b] = `[f a, f b]%classic.
Proof.
by rewrite mono_surj_image_segment ?inc_segment_image//; left.
Qed.
Lemma dec_surj_image_segmentSource code aSource code bSource code fSource code : a <= b ->
{in `[a, b] &, {homo f : xSource code ySource code /~ x <= y}} ->
set_surj `[a, b] `[f b, f a] f ->
f @` `[a, b] = `[f b, f a]%classic.
Proof.
by rewrite mono_surj_image_segment ?dec_segment_image//; right.
Qed.
Lemma inc_surj_image_segmentPSource code aSource code bSource code fSource code : a <= b ->
{in `[a, b] &, {homo f : xSource code ySource code / x <= y}} ->
set_surj `[a, b] `[f a, f b] f ->
forall ySource code, reflect (exists2 xSource code, x \in `[a, b] & f x = y) (y \in `[f a, f b]).
Proof.
Lemma dec_surj_image_segmentPSource code aSource code bSource code fSource code : a <= b ->
{in `[a, b] &, {homo f : xSource code ySource code /~ x <= y}} ->
set_surj `[a, b] `[f b, f a] f ->
forall ySource code, reflect (exists2 xSource code, x \in `[a, b] & f x = y) (y \in `[f b, f a]).
Proof.
Lemma mono_surj_image_segmentPUsed by
- mathcomp.analysis.realfun
Source code aSource code bSource code fSource code : a <= b ->
monotonic `[a, b] f -> set_surj `[a, b] (f @`[a, b]) f ->
forall ySource code, reflect (exists2 xSource code, x \in `[a, b] & f x = y) (y \in f @`[a, b]).
Proof.
End image_interval.
Lemma bigcup_ballTUsed by
- mathcomp.analysis.real_measure.lebesgue_measure
Source code {RSource code : realType} : \bigcup_nSource code ball (0%R : R) n%:R = setT.
Proof.
Section nbhs_pseudoMetricType.
Context {RSource code : numDomainType} {TSource code : pseudoMetricType R}.
Lemma ex_ball_sigSource code (xSource code : T) (PSource code : set T) :
~ (forall epsSource code : {posnum R}, ~ (ball x eps%:num `<=` ~` P)) ->
{dSource code : {posnum R} | ball x d%:num `<=` ~` P}.
Proof.
Lemma nbhsCSource code (xSource code : T) (PSource code : set T) :
~ (forall epsSource code : {posnum R}, ~ (ball x eps%:num `<=` ~` P)) ->
nbhs x (~` P).
Proof.
Lemma nbhsC_ballUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (xSource code : T) (PSource code : set T) :
nbhs x (~` P) -> {dSource code : {posnum R} | ball x d%:num `<=` ~` P}.
Proof.
Lemma nbhs_exUsed by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.realfun
Source code (xSource code : T) (PSource code : T -> Prop) : nbhs x P ->
{dSource code : {posnum R} | forall ySource code, ball x d%:num y -> P y}.
Proof.
End nbhs_pseudoMetricType.
Global Instance Proper_dnbhs_numFieldTypeSource code (RSource code : numFieldType) (xSource code : R) :
ProperFilter x^'.
Proof.
#[global] Hint Extern 0 (ProperFilter _^') =>
solve[apply: Proper_dnbhs_numFieldType] : typeclass_instances.
Definition pinfty_nbhs
pinfty_nbhs : forall R : numFieldType, set_system R pinfty_nbhs is not universe polymorphic Arguments pinfty_nbhs R _ pinfty_nbhs is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.num_normedtype.pinfty_nbhs Declared in library mathcomp.analysis.normedtype_theory.num_normedtype, line 218, characters 11-22
Used by
- mathcomp.analysis.probability_theory.exponential_distribution
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.derive
- mathcomp.analysis.landau
- mathcomp.analysis.normedtype_theory.normed_module
Source code (RSource code : numFieldType) : set_system R :=
fun PSource code => exists MSource code, M \is Num.real /\ forall xSource code, M < x -> P x.
Arguments pinfty_nbhs R : clear implicits.
Definition ninfty_nbhs
ninfty_nbhs : forall R : numFieldType, set_system R ninfty_nbhs is not universe polymorphic Arguments ninfty_nbhs R _ ninfty_nbhs is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.num_normedtype.ninfty_nbhs Declared in library mathcomp.analysis.normedtype_theory.num_normedtype, line 221, characters 11-22
Used by
- mathcomp.analysis.derive
- mathcomp.analysis.exp
Source code (RSource code : numFieldType) : set_system R :=
fun PSource code => exists MSource code, M \is Num.real /\ forall xSource code, x < M -> P x.
Arguments ninfty_nbhs R : clear implicits.
Notation "+oo_ R"Source code := (pinfty_nbhs R) (only parsing) : ring_scope.
Notation "-oo_ R"Used by
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code := (ninfty_nbhs R) (only parsing) : ring_scope.
Notation "+oo"Source code := (pinfty_nbhs _) : ring_scope.
Notation "-oo"Used by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
- mathcomp.analysis.normedtype_theory.ereal_normedtype
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.exp
Source code := (ninfty_nbhs _) : ring_scope.
Lemma ninftyNUsed by
- mathcomp.analysis.realfun
Source code {RSource code : numFieldType} : (- x : R)%R @[xSource code --> -oo] = +oo.
Proof.
Lemma ninftyUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
Source code {RSource code : numFieldType} : (- x : R)%R @[xSource code --> +oo] = -oo.
Proof.
Lemma pinftyVUsed by
- mathcomp.analysis.realfun
Source code (RSource code : numFieldType) : x^-1 @[xSource code --> +oo] = (0 : R)^'+.
Proof.
- have mM1_gt0 : 0 < maxr M 1 by case: (@real_leP _ _ 1) => //; exact: lt_trans.
exists (maxr M 1)^-1; first by rewrite /= invr_gt0.
move=> x /= /[swap] x_gt0.
rewrite distrC subr0 gtr0_norm// invf_pgt ?posrE// => mM1_lt_xV.
rewrite -(invrK x); apply: MA.
apply: le_lt_trans mM1_lt_xV.
by case: (@real_leP _ _ 1).
- exists r^-1; split; first by rewrite realV gtr0_real.
move=> x /[dup] rV_lt_x.
have x_gt0 : x > 0 by rewrite (lt_trans _ rV_lt_x)// invr_gt0.
rewrite invf_plt//= => xV_lt_r.
apply: rA; last by rewrite invr_gt0.
by rewrite /= distrC subr0 gtr0_norm// invr_gt0.
Qed.
Lemma ninftyVUsed by
- mathcomp.analysis.realfun
Source code (RSource code : numFieldType) : x^-1 @[xSource code --> -oo] = (0 : R)^'-.
Proof.
- have MN1_lt0 : minr M (- 1) < 0.
by case: (@real_leP _ _ (- 1)) => // /le_lt_trans; exact.
exists (- minr M (- 1))^-1; first by rewrite /= invr_gt0 oppr_gt0.
move=> x /= /[swap] x_lt0.
rewrite distrC subr0 ltr0_norm// invrN ltrN2 => x_gt_VM'.
rewrite -(invrK x); apply: MA.
apply: (@lt_le_trans _ _ (minr M (- 1))); first by rewrite invf_nlt.
by case: (@real_ltP _ _ (- 1)).
- exists (- r^-1); split; first by rewrite realN realV gtr0_real.
move=> x /[dup] x_lt_NrV.
have x_lt0 : x < 0 by rewrite (lt_trans x_lt_NrV)// oppr_lt0 invr_gt0.
rewrite ltrNr invf_plt// ?posrE ?oppr_gt0// => NxV_lt_r.
apply: rA; last by rewrite invr_lt0.
by rewrite /= distrC subr0 ltr0_norm ?invr_lt0// -invrN.
Qed.
Section infty_nbhs_instances.
Context {RSource code : numFieldType}.
Implicit Types r : R.
Global Instance proper_pinfty_nbhsUsed by
- mathcomp.analysis.ftc
Source code : ProperFilter (pinfty_nbhs R).
Proof.
by move=> P [M [Mreal MP]]; exists (M + 1); apply MP; rewrite ltrDl.
split=> /= [|P Q [MP [MPr gtMP]] [MQ [MQr gtMQ]] |P Q sPQ [M [Mr gtM]]].
- by exists 0.
- exists (maxr MP MQ); split=> [|x]; first exact: max_real.
by rewrite comparable_gt_max ?real_comparable // => /andP[/gtMP ? /gtMQ].
- by exists M; split => // ? /gtM /sPQ.
Qed.
Global Instance proper_ninfty_nbhsSource code : ProperFilter (ninfty_nbhs R).
Proof.
move=> P [M [Mr ltMP]]; exists (M - 1).
by apply: ltMP; rewrite gtrDl oppr_lt0.
split=> /= [|P Q [MP [MPr ltMP]] [MQ [MQr ltMQ]] |P Q sPQ [M [Mr ltM]]].
- by exists 0.
- exists (minr MP MQ); split=> [|x]; first exact: min_real.
by rewrite comparable_lt_min ?real_comparable // => /andP[/ltMP ? /ltMQ].
- by exists M; split => // x /ltM /sPQ.
Qed.
Lemma nbhs_pinfty_gtUsed by
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code rSource code : r \is Num.real -> \forall xSource code \near +oo, r < x.
Proof.
Lemma nbhs_pinfty_geUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.derive
- mathcomp.analysis.landau
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.exp
Source code rSource code : r \is Num.real -> \forall xSource code \near +oo, r <= x.
Proof.
Lemma nbhs_ninfty_ltSource code rSource code : r \is Num.real -> \forall xSource code \near -oo, r > x.
Proof.
Lemma nbhs_ninfty_leUsed by
- mathcomp.analysis.derive
Source code rSource code : r \is Num.real -> \forall xSource code \near -oo, r >= x.
Proof.
Lemma nbhs_pinfty_realSource code : \forall xSource code \near +oo, x \is @Num.real R.
Proof.
Lemma nbhs_ninfty_realSource code : \forall xSource code \near -oo, x \is @Num.real R.
Proof.
Lemma pinfty_ex_gtSource code (mSource code : R) (ASource code : set R) : m \is Num.real ->
(\forall kSource code \near +oo, A k) -> exists2 MSource code, m < M & A M.
Proof.
by exists M; near: M => //; apply: nbhs_pinfty_gt.
Unshelve. all: by end_near. Qed.
Lemma pinfty_ex_geSource code (mSource code : R) (ASource code : set R) : m \is Num.real ->
(\forall kSource code \near +oo, A k) -> exists2 MSource code, m <= M & A M.
Proof.
by exists M; near: M => //; apply: nbhs_pinfty_ge.
Unshelve. all: by end_near. Qed.
Lemma pinfty_ex_gt0Used by
- mathcomp.analysis.sequences
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
- mathcomp.analysis.normedtype_theory.normed_module
Source code (ASource code : set R) :
(\forall kSource code \near +oo, A k) -> exists2 MSource code, M > 0 & A M.
Proof.
Lemma near_pinfty_div2Used by
- mathcomp.analysis.landau
Source code (ASource code : set R) :
(\forall kSource code \near +oo, A k) -> (\forall kSource code \near +oo, A (k / 2)).
Proof.
by move=> x; rewrite -ltr_pdivlMr //; exact: AM.
Qed.
Lemma not_near_inftyPUsed by
- mathcomp.analysis.realfun
Source code (PSource code : pred R) :
~ (\forall xSource code \near +oo, P x) <->
forall MSource code : R, M \is Num.real -> exists2 xSource code, M < x & ~ P x.
Proof.
Lemma not_near_ninftyPSource code (PSource code : pred R):
~ (\forall xSource code \near -oo, P x) <->
forall MSource code : R, M \is Num.real -> exists2 xSource code, x < M & ~ P x.
Proof.
End infty_nbhs_instances.
#[global] Hint Extern 0 (is_true (_ < ?x)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_pinfty_gt] end : core.
#[global] Hint Extern 0 (is_true (_ <= ?x)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_pinfty_ge] end : core.
#[global] Hint Extern 0 (is_true (_ > ?x)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_ninfty_lt] end : core.
#[global] Hint Extern 0 (is_true (_ >= ?x)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_ninfty_le] end : core.
#[global] Hint Extern 0 (is_true (?x \is Num.real)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_pinfty_real] end : core.
#[global] Hint Extern 0 (is_true (?x \is Num.real)) => match goal with
H : x \is_near _ |- _ => solve[near: x; now apply: nbhs_ninfty_real] end : core.
Section cvg_infty_numField.
Context {RSource code : numFieldType}.
Let cvgryPnumSource code {FSource code : set_system R} {FFSource code : Filter F} : [<->
F --> +oo;
forall ASource code, A \is Num.real -> \forall xSource code \near F, A <= x;
forall ASource code, A \is Num.real -> \forall xSource code \near F, A < x;
\forall ASource code \near +oo, \forall xSource code \near F, A < x;
\forall ASource code \near +oo, \forall xSource code \near F, A <= x ].
Proof.
- move=> AF A Areal; near +oo_R => B.
by near do apply: (@lt_le_trans _ _ B) => //=; apply: AF.
- by move=> Foo; near do apply: Foo => //.
- by apply: filterS => ?; apply: filterS => ?; apply: ltW.
case=> [A [AR AF]] P [x [xR Px]]; near +oo_R => B.
by near do [apply: Px; apply: (@lt_le_trans _ _ B) => //]; apply: AF.
Unshelve. all: by end_near. Qed.
Let cvgrNyPnumSource code {FSource code : set_system R} {FFSource code : Filter F} : [<->
F --> -oo;
forall ASource code, A \is Num.real -> \forall xSource code \near F, A >= x;
forall ASource code, A \is Num.real -> \forall xSource code \near F, A > x;
\forall ASource code \near -oo, \forall xSource code \near F, A > x;
\forall ASource code \near -oo, \forall xSource code \near F, A >= x ].
Proof.
- move=> AF A Areal; near -oo_R => B.
by near do apply: (@le_lt_trans _ _ B) => //; apply: AF.
- by move=> Foo; near do apply: Foo => //.
- by apply: filterS => ?; apply: filterS => ?; apply: ltW.
case=> [A [AR AF]] P [x [xR Px]]; near -oo_R => B.
by near do [apply: Px; apply: (@le_lt_trans _ _ B) => //]; apply: AF.
Unshelve. all: end_near. Qed.
Context {TSource code} {FSource code : set_system T} {FFSource code : Filter F}.
Implicit Types f : T -> R.
Lemma cvgryPgerUsed by
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code fSource code :
f @ F --> +oo <-> forall ASource code, A \is Num.real -> \forall xSource code \near F, A <= f x.
Proof.
Lemma cvgryPgtrSource code fSource code :
f @ F --> +oo <-> forall ASource code, A \is Num.real -> \forall xSource code \near F, A < f x.
Proof.
Lemma cvgryPgtyUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code fSource code :
f @ F --> +oo <-> \forall ASource code \near +oo, \forall xSource code \near F, A < f x.
Proof.
Lemma cvgryPgeyUsed by
- mathcomp.analysis.exp
Source code fSource code :
f @ F --> +oo <-> \forall ASource code \near +oo, \forall xSource code \near F, A <= f x.
Proof.
Lemma cvgrNyPlerUsed by
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code fSource code :
f @ F --> -oo <-> forall ASource code, A \is Num.real -> \forall xSource code \near F, A >= f x.
Proof.
Lemma cvgrNyPltrSource code fSource code :
f @ F --> -oo <-> forall ASource code, A \is Num.real -> \forall xSource code \near F, A > f x.
Proof.
Lemma cvgrNyPltNySource code fSource code :
f @ F --> -oo <-> \forall ASource code \near -oo, \forall xSource code \near F, A > f x.
Proof.
Lemma cvgrNyPleNySource code fSource code :
f @ F --> -oo <-> \forall ASource code \near -oo, \forall xSource code \near F, A >= f x.
Proof.
Lemma cvgry_gerSource code fSource code :
f @ F --> +oo -> forall ASource code, A \is Num.real -> \forall xSource code \near F, A <= f x.
Proof.
Lemma cvgry_gtrSource code fSource code :
f @ F --> +oo -> forall ASource code, A \is Num.real -> \forall xSource code \near F, A < f x.
Proof.
Lemma cvgrNy_lerSource code fSource code :
f @ F --> -oo -> forall ASource code, A \is Num.real -> \forall xSource code \near F, A >= f x.
Proof.
Lemma cvgrNy_ltrSource code fSource code :
f @ F --> -oo -> forall ASource code, A \is Num.real -> \forall xSource code \near F, A > f x.
Proof.
Lemma cvgNryUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.exp
Source code fSource code : (- f @ F --> +oo) <-> (f @ F --> -oo).
Proof.
by near do rewrite -lerN2 ?opprK; apply: Foo; rewrite rpredN.
Unshelve. all: end_near. Qed.
Lemma cvgNrNyUsed by
- mathcomp.analysis.ftc
Source code fSource code : (- f @ F --> -oo) <-> (f @ F --> +oo).
Lemma cvgryVUsed by
- mathcomp.analysis.realfun
Source code fSource code : f @ F --> +oo -> (f x)^-1 @[xSource code --> F] --> (0 : R).
Proof.
Lemma cvgrNyVSource code fSource code : f @ F --> -oo -> (f x)^-1 @[xSource code --> F] --> (0 : R).
Proof.
End cvg_infty_numField.
Section cvg_infty_realField.
Context {RSource code : realFieldType}.
Context {TSource code} {FSource code : set_system T} {FFSource code : Filter F} (fSource code : T -> R).
Lemma cvgryPgeUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.ftc
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_definition
- mathcomp.analysis.normedtype_theory.normed_module
Source code : f @ F --> +oo <-> forall ASource code, \forall xSource code \near F, A <= f x.
Lemma cvgryPgtUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code : f @ F --> +oo <-> forall ASource code, \forall xSource code \near F, A < f x.
Lemma cvgrNyPleUsed by
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.exp
Source code : f @ F --> -oo <-> forall ASource code, \forall xSource code \near F, A >= f x.
Proof.
Lemma cvgrNyPltSource code : f @ F --> -oo <-> forall ASource code, \forall xSource code \near F, A > f x.
Proof.
Lemma cvgry_geSource code : f @ F --> +oo -> forall ASource code, \forall xSource code \near F, A <= f x.
Proof.
Lemma cvgry_gtUsed by
- mathcomp.analysis.realfun
Source code : f @ F --> +oo -> forall ASource code, \forall xSource code \near F, A < f x.
Proof.
Lemma cvgrNy_leSource code : f @ F --> -oo -> forall ASource code, \forall xSource code \near F, A >= f x.
Proof.
Lemma cvgrNy_ltUsed by
- mathcomp.analysis.realfun
Source code : f @ F --> -oo -> forall ASource code, \forall xSource code \near F, A > f x.
Proof.
End cvg_infty_realField.
Lemma cvgr_expr2Used by
- mathcomp.analysis.gauss_integral
Source code {RSource code : realFieldType} : (x ^+ 2 : R) @[xSource code --> +oo] --> +oo.
Proof.
Lemma cvgr_idnUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.ftc
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.sequences
- mathcomp.analysis.exp
Source code {RSource code : realType} : (n%:R : R) @[nSource code --> \oo] --> +oo.
Proof.
Lemma cvgrnyPUsed by
- mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code {RSource code : realType} {TSource code} {FSource code : set_system T} {FFSource code : Filter F} (fSource code : T -> nat) :
(((f n)%:R : R) @[nSource code --> F] --> +oo) <-> (f @ F --> \oo).
Proof.
Section gt0_cvg.
Context {RSource code : realFieldType} {FSource code : set_system R} {FFSource code : Filter F} (MSource code : R)
(fSource code : R -> R).
Hypothesis M0Source code : 0 < M.
Lemma gt0_cvgMlNyUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.exp
Source code : (f r) @[rSource code --> F] --> -oo -> (f r * M)%R @[rSource code --> F] --> -oo.
Proof.
Lemma gt0_cvgMrNySource code : (f r) @[rSource code --> F] --> -oo -> (M * f r)%R @[rSource code --> F] --> -oo.
Proof.
Lemma gt0_cvgMlyUsed by
- mathcomp.analysis.probability_theory.normal_distribution
Source code : f r @[rSource code --> F] --> +oo -> (f r * M)%R @[rSource code --> F] --> +oo.
Proof.
Lemma gt0_cvgMryUsed by
- mathcomp.analysis.probability_theory.exponential_distribution
Source code : f r @[rSource code --> F] --> +oo -> (M * f r)%R @[rSource code --> F] --> +oo.
Proof.
End gt0_cvg.
Section lt0_cvg.
Context {RSource code : realFieldType} {FSource code : set_system R} {FFSource code : Filter F}
(MSource code : R) (fSource code : R -> R).
Hypothesis M0Source code : M < 0.
Lemma lt0_cvgMlNyUsed by
- mathcomp.analysis.exp
Source code : (f r) @[rSource code --> F] --> +oo -> (f r * M)%R @[rSource code --> F] --> -oo.
Proof.
Lemma lt0_cvgMrNyUsed by
- mathcomp.analysis.exp
Source code : (f r) @[rSource code --> F] --> +oo -> (M * f r)%R @[rSource code --> F] --> -oo.
Proof.
Lemma lt0_cvgMlySource code : f r @[rSource code --> F] --> -oo -> (f r * M)%R @[rSource code --> F] --> +oo.
Proof.
Lemma lt0_cvgMrySource code : f r @[rSource code --> F] --> -oo -> (M * f r)%R @[rSource code --> F] --> +oo.
Proof.
End lt0_cvg.
Lemma cvgNy_compNPUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.exp
Source code {TSource code : topologicalType} {RSource code : numFieldType} (fSource code : R -> T)
(lSource code : set_system T) :
f x @[xSource code --> -oo] --> l <-> (f \o -%R) x @[xSource code --> +oo] --> l.
Proof.
Lemma cvgy_compNPSource code {TSource code : topologicalType} {RSource code : numFieldType} (fSource code : R -> T)
(lSource code : set_system T) :
f x @[xSource code --> +oo] --> l <-> (f \o -%R) x @[xSource code --> -oo] --> l.
Proof.
Section monotonic_itv_bigcup.
Context {RSource code : realType}.
Implicit Types (F : R -> R) (a : R).
Lemma decreasing_itvNyo_bigcupUsed by
- mathcomp.analysis.ftc
Source code FSource code aSource code :
{in `[a, +oo[ &, {homo F : xSource code ySource code /~ x < y}} ->
F x @[xSource code --> +oo] --> -oo ->
(`]-oo, F a[ = \bigcup_iSource code `]F (a + i.+1%:R), F a[)%classic.
Proof.
- move=> y/= [n _]/=; rewrite in_itv/= => /andP[Fany yFa].
have [i iFan] : exists iSource code, F (a + i.+1%:R) < F a - n%:R.
move/cvgrNy_lt : nyF.
move/(_ (F a - n%:R)) => [z [zreal zFan]].
by exists (truncn (z - a)); rewrite zFan// -ltrBlDl truncnS_gt.
by exists i => //=; rewrite in_itv/= yFa (lt_le_trans _ Fany).
- move=> z/= [n _ /=]; rewrite in_itv/= => /andP[Fanz zFa].
exists (truncn (F a - F (a + n.+1%:R))).+1 => //=.
rewrite in_itv/= zFa andbT lerBlDr -lerBlDl ltW//.
by rewrite -truncn_le_nat le_truncn// lerB// ltW.
Qed.
Lemma decreasing_itvoo_bigcupUsed by
- mathcomp.analysis.ftc
Source code FSource code aSource code nSource code :
{in `[a, +oo[ &, {homo F : xSource code ySource code /~ x < y}} ->
(`]F (a + n%:R), F a[ = \bigcup_(iSource code < n) `]F (a + i.+1%:R), F a[)%classic.
Proof.
- move: n => [|n]; first by rewrite addr0 set_itvoo0.
by apply: (@bigcup_sup _ _ n) => /=.
- apply: bigcup_sub => k/= kn; apply: subset_itvr; rewrite bnd_simp.
move: kn; rewrite leq_eqVlt => /predU1P[<-//|kn].
by rewrite ltW// decrF ?in_itv/= ?andbT ?lerDl//= ltrD2l ltr_nat.
Qed.
Lemma increasing_itvNyo_bigcupSource code FSource code aSource code :
{in `]-oo, a] &, {homo F : xSource code ySource code / x < y}} ->
F x @[xSource code --> -oo] --> -oo ->
(`]-oo, F a] = \bigcup_iSource code `]F (a - i.+1%:R), F a])%classic.
Proof.
- move=> y/= [n _]/=; rewrite in_itv/= => /andP[Fany yFa].
have [i iFan] : exists iSource code, F (a - i.+1%:R) < F a - n%:R.
move/cvgrNy_lt : nyF => /(_ (F a - n%:R))[z [zreal zFan]].
exists (truncn (a - z)).
by rewrite zFan// ltrBlDr -ltrBlDl -truncn_le_nat.
by exists i => //=; rewrite in_itv/= yFa andbT (lt_le_trans _ Fany).
- move=> z/= [n _ /=]; rewrite in_itv/= => /andP[Fanz zFa].
exists (truncn (F a - F (a - n.+1%:R))).+1 => //=.
rewrite in_itv/= zFa andbT lerBlDr -lerBlDl ltW//.
by rewrite -truncn_le_nat le_truncn// lerB// ltW.
Qed.
Lemma increasing_itvoc_bigcupSource code FSource code aSource code nSource code :
{in `]-oo, a] &, {homo F : xSource code ySource code / x < y}} ->
(`]F (a - n%:R), F a] = \bigcup_(iSource code < n) `]F (a - i.+1%:R), F a])%classic.
Proof.
- move: n => [|n]; first by rewrite subr0 set_itvoc0.
by apply: (@bigcup_sup _ _ n) => /=.
- apply: bigcup_sub => k/= kn; apply: subset_itvr; rewrite bnd_simp.
move: kn; rewrite leq_eqVlt => /predU1P[<-//|kn].
by rewrite ltW// incrF ?in_itv/= ?andbT ?gerBl ?ler_ltB ?ltr_nat.
Qed.
End monotonic_itv_bigcup.
Section open_closed_sets.
Context {RSource code : realFieldType}.
Implicit Types x y : R.
Lemma open_ltUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code ySource code : open [set xSource code | x < y].
Proof.
by rewrite /= ltr_distlC subrKC => /andP[].
Qed.
Lemma open_gtUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.sequences
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code ySource code : open [set xSource code | x > y].
Proof.
by rewrite /= ltr_distlC subKr => /andP[].
Qed.
Lemma open_neqSource code ySource code : open [set xSource code | x != y].
Proof.
Lemma interval_openUsed by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.real_measure.lebesgue_stieltjes_measure
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.urysohn
Source code aSource code bSource code : ~~ bound_side true a -> ~~ bound_side false b ->
open [set xSource code : R^o | x \in Interval a b].
Proof.
- have -> : [set xSource code | a < x < b] = [set xSource code | a < x] `&` [set xSource code | x < b].
by rewrite predeqE => r; rewrite /mkset; split => [/andP[? ?] //|[-> ->]].
by apply openI; [exact: open_gt | exact: open_lt].
- by under eq_set do rewrite itv_ge// inE.
- by under eq_set do rewrite in_itv andbT/=; exact: open_gt.
- exact: open_lt.
- by rewrite (_ : mkset _ = setT); [rewrite predeqE | exact: openT].
Qed.
Lemma closed_leUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code ySource code : closed [set xSource code | x <= y].
Proof.
Lemma closed_geUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code ySource code : closed [set xSource code | y <= x].
Proof.
Lemma closed_eqUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code ySource code : closed [set xSource code | x = y].
Proof.
Lemma interval_closedUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.numfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code aSource code bSource code : ~~ bound_side false a -> ~~ bound_side true b ->
closed [set xSource code : R^o | x \in Interval a b].
Proof.
do ?by under eq_set do rewrite itv_ge// inE falseE; apply: closed0.
- have -> : `[a, b]%classic = [set xSource code | x >= a] `&` [set xSource code | x <= b].
by rewrite predeqE => ?; rewrite /= in_itv/=; split=> [/andP[]|[->]].
by apply closedI; [exact: closed_ge | exact: closed_le].
- by under eq_set do rewrite in_itv andbT/=; exact: closed_ge.
- exact: closed_le.
Qed.
End open_closed_sets.
#[global] Hint Extern 0 (open _) => now apply: open_gt : core.
#[global] Hint Extern 0 (open _) => now apply: open_lt : core.
#[global] Hint Extern 0 (open _) => now apply: open_neq : core.
#[global] Hint Extern 0 (closed _) => now apply: closed_ge : core.
#[global] Hint Extern 0 (closed _) => now apply: closed_le : core.
#[global] Hint Extern 0 (closed _) => now apply: closed_eq : core.
#[global] Hint Extern 0 (open _) => now apply: interval_open : core.
Section near_in_itv.
Context {RSource code : realFieldType} (aSource code bSource code : R).
Lemma near_in_itvooUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.elementary_functions.trigonometry_functions
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.normedtype_theory.normed_module
Source code :
{in `]a, b[, forall ySource code, \forall zSource code \near y, z \in `]a, b[}.
Proof.
Lemma near_in_itvoyUsed by
- mathcomp.analysis.ftc
Source code :
{in `]a, +oo[, forall ySource code, \forall zSource code \near y, z \in `]a, +oo[}.
Proof.
Lemma near_in_itvNyoSource code :
{in `]-oo, b[, forall ySource code, \forall zSource code \near y, z \in `]-oo, b[}.
Proof.
End near_in_itv.
Lemma nbhs_infty_gtrSource code {RSource code : archiRealFieldType} (rSource code : R) :
\forall nSource code \near \oo, r < n%:R.
Proof.
Lemma near_infty_natSinv_ltUsed by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_nonneg
- mathcomp.analysis.normedtype_theory.normed_module
Source code (RSource code : archiRealFieldType) (eSource code : {posnum R}) :
\forall nSource code \near \oo, n.+1%:R^-1 < e%:num.
Proof.
Lemma near_infty_natSinv_expn_ltUsed by
- mathcomp.analysis.lebesgue_integral_theory.measurable_fun_approximation
Source code (RSource code : archiRealFieldType) (eSource code : {posnum R}) :
\forall nSource code \near \oo, 1 / 2 ^+ n < e%:num.
Proof.
rewrite mul1r invf_plt ?unfold_in//=; apply: upper_nthrootP.
near: n; eexists; last by move=> m; exact.
by [].
Unshelve. all: by end_near. Qed.
Section interval.
Context {RSource code : numDomainType}.
Definition is_interval
is_interval : forall {R : numDomainType}, set R -> Prop is_interval is not universe polymorphic Arguments is_interval {R} E%_classical_set_scope is_interval is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.num_normedtype.is_interval Declared in library mathcomp.analysis.normedtype_theory.num_normedtype, line 808, characters 11-22
Used by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code (ESource code : set R) :=
forall xSource code ySource code, E x -> E y -> forall zSource code, x <= z <= y -> E z.
Lemma is_intervalPltUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (ESource code : set R) :
is_interval E <-> forall xSource code ySource code, E x -> E y -> forall zSource code, x < z < y -> E z.
Proof.
Lemma interval_is_intervalUsed by
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code (iSource code : interval R) : is_interval [set` i].
Proof.
End interval.
Lemma interval_unbounded_setTUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code {RSource code : realFieldType} (XSource code : set R) : is_interval X ->
~ has_lbound X -> ~ has_ubound X -> X = setT.
Proof.
Section open_union_rat.
Context {RSource code : realType}.
Implicit Types A U : set R.
Let ointsubSource code ASource code USource code := [/\ open A, is_interval A & A `<=` U].
Let ointsub_ratSource code USource code qSource code := [set ASource code | ointsub A U /\ A (ratr q)].
Let ointsub_rat0Source code qSource code : ointsub_rat set0 q = set0.
Definition bigcup_ointsub
bigcup_ointsub : forall {R : realType}, set R -> rat -> set R bigcup_ointsub is not universe polymorphic Arguments bigcup_ointsub {R} U%_classical_set_scope q%_ring_scope _ bigcup_ointsub is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.num_normedtype.bigcup_ointsub Declared in library mathcomp.analysis.normedtype_theory.num_normedtype, line 849, characters 11-25
Used by
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code := \bigcup_(ASource code in ointsub_rat U q) A.
Lemma bigcup_ointsub0Source code qSource code : bigcup_ointsub set0 q = set0.
Proof.
Lemma open_bigcup_ointsubUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code : open (bigcup_ointsub U q).
Proof.
Lemma is_interval_bigcup_ointsubUsed by
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code : is_interval (bigcup_ointsub U q).
Proof.
Lemma bigcup_ointsub_subUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code : bigcup_ointsub U q `<=` U.
Proof.
Lemma bigcup_ointsub_supUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code ASource code :
open A -> is_interval A -> A `<=` U -> A (ratr q) ->
A `<=` bigcup_ointsub U q.
Proof.
Lemma bigcup_ointsub_memUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code qSource code rSource code : bigcup_ointsub U q r -> ratr q \in U.
Proof.
- mathcomp.analysis.real_measure.measurable_realfun
- mathcomp.analysis.normedtype_theory.normed_module
Source code USource code : open U ->
U = \bigcup_(qSource code in [set qSource code | ratr q \in U]) bigcup_ointsub U q.
Proof.
by rewrite bigcup0// => q _; rewrite bigcup_ointsub0.
apply/seteqP; split=> [x Ux|x [p _ Ipx]]; last exact: bigcup_ointsub_sub Ipx.
suff [q Iqx] : exists qSource code, bigcup_ointsub U q x.
by exists q => //=; rewrite in_setE; case: Iqx => A [[_ _ +] ? _]; exact.
have : nbhs x U by rewrite nbhsE /=; exists U.
rewrite -nbhs_ballE /nbhs_ball /nbhs_ball_ => -[_/posnumP[r] xrU].
have /rat_in_itvoo[q qxxr] : (x - r%:num < x + r%:num)%R.
by rewrite ltrBlDr -addrA ltrDl.
exists q, `](x - r%:num)%R, (x + r%:num)%R[%classic; last first.
by rewrite /= in_itv/= ltrBlDl ltrDr// ltrDl//; apply/andP.
split=> //; split; [exact: interval_open|exact: interval_is_interval|].
move=> y /=; rewrite in_itv/= => /andP[xy yxr]; apply xrU => /=.
rewrite /ball /= /ball_ /= in xrU *; have [yx|yx] := leP x y.
by rewrite ler0_norm ?subr_le0// opprB ltrBlDl.
by rewrite gtr0_norm ?subr_gt0// ltrBlDr -ltrBlDl.
Qed.
End open_union_rat.
Section ball_realFieldType.
Context {RSource code : realFieldType}.
Lemma ball0Used by
- mathcomp.analysis.real_measure.lebesgue_measure
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.normedtype_theory.vitali_lemma
Source code (aSource code rSource code : R) : ball a r = set0 <-> r <= 0.
Proof.
End ball_realFieldType.
Section interval_realType.
Context {RSource code : realType}.
Lemma interval_left_unbounded_interiorUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (XSource code : set R) : is_interval X ->
~ has_lbound X -> has_ubound X -> X° = [set rSource code | r < sup X].
Proof.
rewrite -(open_subsetE _ (@open_lt _ _)) => r rsupX.
move/has_lbPn : lX => /(_ r)[y Xy yr].
have hsX : has_sup X by split => //; exists y.
have /sup_adherent/(_ hsX)[e Xe] : 0 < sup X - r by rewrite subr_gt0.
by rewrite subKr => re; apply: (iX y e); rewrite ?ltW.
Qed.
Lemma interval_right_unbounded_interiorUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (XSource code : set R) : is_interval X ->
has_lbound X -> ~ has_ubound X -> X° = [set rSource code | inf X < r].
Proof.
rewrite -(open_subsetE _ (@open_gt _ _)) => r infXr.
move/has_ubPn : uX => /(_ r)[y Xy yr].
have hiX : has_inf X by split => //; exists y.
have /inf_adherent/(_ hiX)[e Xe] : 0 < r - inf X by rewrite subr_gt0.
by rewrite addrC subrK => er; apply: (iX e y); rewrite ?ltW.
Qed.
Lemma interval_bounded_interiorUsed by
- mathcomp.analysis.normedtype_theory.normed_module
Source code (XSource code : set R) : is_interval X ->
has_lbound X -> has_ubound X -> X° = [set rSource code | inf X < r < sup X].
Proof.
apply/andP; split;
[exact: left_bounded_interior|exact: right_bounded_interior].
rewrite -open_subsetE; first exact: (@interval_open _ (BRight _) (BLeft _)).
move=> r /andP[iXr rsX].
have [X0|/set0P X0] := eqVneq X set0.
by move: (lt_trans iXr rsX); rewrite X0 inf_out ?sup_out ?ltxx // => - [[]].
have hiX : has_inf X by split.
have /inf_adherent/(_ hiX)[e Xe] : 0 < r - inf X by rewrite subr_gt0.
rewrite addrC subrK => er.
have hsX : has_sup X by split.
have /sup_adherent/(_ hsX)[f Xf] : 0 < sup X - r by rewrite subr_gt0.
by rewrite subKr => rf; apply: (iX e f); rewrite ?ltW.
Qed.
Lemma interior_set1Source code (aSource code : R) : [set a]° = set0.
Proof.
Lemma interior_itv_bndSource code (xSource code ySource code : R) (aSource code bSource code : bool) :
[set` Interval (BSide a x) (BSide b y)]° = `]x, y[%classic.
Proof.
rewrite le_eqVlt => /predU1P[-> |yx].
by case: a; case: b; rewrite set_itvoo0 ?set_itvE ?interior_set1 ?interior0.
rewrite !set_itv_ge ?interior0//.
- by case: a; case: b; rewrite bnd_simp -?leNgt -?ltNge ?ltW.
- by rewrite bnd_simp -leNgt ltW.
rewrite interval_bounded_interior//; first exact: interval_is_interval.
rewrite inf_itv; first by case: a; case b; rewrite bnd_simp ?ltW.
rewrite sup_itv; first by case: a; case b; rewrite bnd_simp ?ltW.
exact: set_itvoo.
Qed.
Lemma interior_itv_bndySource code (xSource code : R) (bSource code : bool) :
[set` Interval (BSide b x) (BInfty _ false)]° = `]x, +oo[%classic.
Proof.
- exact: interval_is_interval.
- by apply: hasNubound_itv; rewrite lt_eqF.
- rewrite inf_itv; first by case: b; rewrite bnd_simp ?ltW.
by rewrite set_itvoy.
Qed.
Lemma interior_itv_NybndSource code (ySource code : R) (bSource code : bool) :
[set` Interval (BInfty _ true) (BSide b y)]° = `]-oo, y[%classic.
Proof.
- exact: interval_is_interval.
- by apply: hasNlbound_itv; rewrite gt_eqF.
- rewrite sup_itv; first by case b; rewrite bnd_simp ?ltW.
exact: set_itvNyo.
Qed.
Lemma interior_itv_NyySource code :
[set` Interval (BInfty R true) (BInfty _ false)]° = `]-oo, +oo[%classic.
Proof.
Definition interior_itv
interior_itv : forall {R : realType}, (forall (x y : R) (a b : bool), [set` Interval (BSide a x) (BSide b y)]°%classic = `]x, y[%classic) * (forall (x : R) (b : bool), [set` Interval (BSide b x) +oo%O]°%classic = `]x, +oo[%classic) * (forall (y : R) (b : bool), [set` Interval -oo%O (BSide b y)]°%classic = `]-oo, y[%classic) * (`]-oo, +oo[°%classic = `]-oo, +oo[%classic) interior_itv is not universe polymorphic Arguments interior_itv {R} interior_itv is transparent Expands to: Constant mathcomp.analysis.normedtype_theory.num_normedtype.interior_itv Declared in library mathcomp.analysis.normedtype_theory.num_normedtype, line 1007, characters 11-23
Used by
- mathcomp.analysis.ftc
- mathcomp.analysis.derive
Source code :=
(interior_itv_bnd, interior_itv_bndy, interior_itv_Nybnd, interior_itv_Nyy).
End interval_realType.
Section continuous_within_itvP.
Context {RSource code : realFieldType} {KSource code : numDomainType} {USource code : pseudoMetricType K}.
Implicit Type f : R -> U.
Let near_at_leftSource code (aSource code : itv_bound R) bSource code fSource code epsSource code : (a < BLeft b)%O -> 0 < eps ->
{within [set` Interval a (BRight b)], continuous f} ->
\forall tSource code \near b^'-, ball (f b) eps (f t).
Proof.
move/continuous_withinNx/cvg_ballP/(_ _ eps_gt0) : (cf b).
rewrite /dnbhs/= near_withinE /prop_near1 /nbhs/=.
rewrite -nbhs_subspace_in//.
rewrite /= in_itv/= lexx andbT.
by move: a ab {cf} => [[a|a]/=|[|]//]; rewrite bnd_simp// => /ltW.
rewrite /within/=; apply: filter_app.
move: a ab {cf} => [a0 a/= /[!bnd_simp] ab|[_|//]].
- exists (b - a); rewrite /= ?subr_gt0// => c cba + ac.
apply=> //; rewrite ?lt_eqF// !in_itv/= (ltW ac)/= andbT; move: cba => /=.
rewrite gtr0_norm ?subr_gt0// ltrD2l ltrNr opprK => {}ac.
by case: a0 => //=; exact/ltW.
- by exists 1%R => //= c cb1 + bc; apply; rewrite ?lt_eqF ?in_itv/= ?ltW.
Qed.
Let near_at_rightSource code aSource code (bSource code : itv_bound R) fSource code epsSource code : (BRight a < b)%O -> 0 < eps ->
{within [set` Interval (BLeft a) b], continuous f} ->
\forall tSource code \near a^'+, ball (f a) eps (f t).
Proof.
move/continuous_withinNx/cvg_ballP/(_ _ eps_gt0) : (cf a).
rewrite /dnbhs/= near_withinE /prop_near1 /nbhs/=.
rewrite -nbhs_subspace_in//.
rewrite /= in_itv/= lexx//=.
by move: b ab {cf} => [[b|b]/=|[|]//]; rewrite bnd_simp// => /ltW.
rewrite /within/=; apply: filter_app.
move: b ab {cf} => [b0 b/= /[!bnd_simp] ab|[//|_]].
- exists (b - a); rewrite /= ?subr_gt0// => c cba + ac.
apply=> //; rewrite ?gt_eqF// !in_itv/= (ltW ac)/=; move: cba => /=.
rewrite ltr0_norm ?subr_lt0// opprB ltrD2r.
by case: b0 => //= /ltW.
- by exists 2%R => //= c ca1 + ac; apply; rewrite ?gt_eqF ?in_itv/= ?ltW.
Qed.
Lemma continuous_within_itvbbPSource code aSource code bSource code (baSource code bbSource code : bool) fSource code : a < b ->
{within [set` Interval (BSide ba a) (BSide bb b)], continuous f} <->
[/\ {in `]a, b[, continuous f},
ba -> f @ a^'+ --> f a &
~~ bb -> f @ b^'- --> f b].
Proof.
have Fa : Filter a^'+ by exact: at_right_proper_filter.
have Fb : Filter b^'- by exact: at_left_proper_filter.
split=> [|baT|bbT]; [| apply/cvg_ballP => e e0 ..].
- apply/in_continuous_mksetP; rewrite -continuous_open_subspace//.
by apply: continuous_subspaceW abf; apply: subset_itvW.
- by move: baT abf => -> abf; exact: (@near_at_right _ (BSide bb b)).
- move: bbT abf => /negbTE -> abf.
by apply: (@near_at_left (BSide ba a)) => //; rewrite bnd_simp.
case=> ctsoo ctsL ctsR.
apply/subspace_continuousP => x /=.
rewrite in_itv/= => /andP[ax xb].
move: ctsL ctsR.
have : a = x /\ ba \/ a < x.
clear - ax.
case: ba ax => /=; last by right.
by case: ltgtP => //; [right|left].
have : b = x /\ (bb = false) \/ x < b.
clear - xb.
case: bb xb => /=; first by right.
by case: ltgtP => //; [right|left].
move=> {ax xb}.
move=> [[<- ->]|xb] [[+ ->]|ax].
- by move/eqP; rewrite lt_eqF.
- move=> _ /(_ erefl) /cvg_at_left_within; apply: cvg_trans.
apply: cvg_app; apply: within_subset.
by move=> ? /=; rewrite in_itv/= => /andP[].
- move=> <- /(_ erefl) /cvg_at_right_within + _; apply: cvg_trans.
apply: cvg_app; apply: within_subset.
by move=> ? /=; rewrite in_itv/= => /andP[].
- move=> _ _; have aboox : x \in `]a, b[ by rewrite !in_itv/= ax.
rewrite within_interior; last exact: ctsoo.
suff : `]a, b[ `<=` [set` Interval (BSide ba a) (BSide bb b)]° by exact.
by rewrite -open_subsetE; [exact: interval_open | exact: subset_itvW].
Qed.
Lemma continuous_within_itvccPUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.derive
- mathcomp.analysis.normedtype_theory.normed_module
Source code aSource code bSource code fSource code : a < b ->
{within `[a, b], continuous f} <->
[/\ {in `]a, b[, continuous f}, f @ a^'+ --> f a & f @ b^'- --> f b].
Proof.
by apply/propeqP; congr and3; apply/propeqP; split=> // /(_ erefl).
Qed.
Lemma continuous_within_itvocPSource code aSource code bSource code fSource code : a < b ->
{within `]a, b], continuous f} <->
({in `]a, b[, continuous f} /\ f @ b^'- --> f b).
Proof.
Lemma continuous_within_itvcoPSource code aSource code bSource code fSource code : a < b ->
{within `[a, b[, continuous f} <->
({in `]a, b[, continuous f} /\ f @ a^'+ --> f a).
Proof.
Lemma continuous_within_itvbyPSource code aSource code (baSource code : bool) fSource code :
{within [set` Interval (BSide ba a) +oo%O], continuous f} <->
({in `]a, +oo[, continuous f} /\ (ba -> f @ a^'+ --> f a)).
Proof.
have Fa : Filter a^'+ by exact: at_right_proper_filter.
split=> [|baT]; [| apply/cvg_ballP => e e0].
- apply/in_continuous_mksetP; rewrite -continuous_open_subspace//.
by apply: continuous_subspaceW cf; apply: subset_itvr; rewrite bnd_simp.
- by move: baT cf => -> cf; exact: (@near_at_right _ +oo%O).
case=> ctsoo ctsL.
apply/subspace_continuousP => x /=.
rewrite in_itv/= andbT => ax.
move: ctsL.
have : a = x /\ ba \/ a < x.
clear - ax. case: ba ax => /=; last by right.
by case: ltgtP => //; [right|left].
move=> [[<- ->]|{}ax].
- move=> /(_ erefl) /cvg_at_right_within; apply: cvg_trans.
apply: cvg_app; apply: within_subset.
by move=> ? /= /itvP ->.
- move=> _; have aboox : x \in `]a, +oo[ by rewrite !in_itv/= ax.
rewrite within_interior; last exact: ctsoo.
suff : `]a, +oo[ `<=` [set` Interval (BSide ba a) +oo%O]° by exact.
rewrite -open_subsetE; first exact: interval_open.
by apply: subset_itvr; rewrite bnd_simp.
Qed.
Lemma continuous_within_itvcyPUsed by
- mathcomp.analysis.probability_theory.exponential_distribution
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.ftc
- mathcomp.analysis.elementary_functions.trigonometry_integral
Source code aSource code fSource code :
{within `[a, +oo[, continuous f} <->
{in `]a, +oo[, continuous f} /\ f x @[xSource code --> a^'+] --> f a.
Proof.
by apply/propeqP; congr and; apply/propeqP; split=> // /(_ erefl).
Qed.
Lemma continuous_within_itvNybPSource code bSource code (bbSource code : bool) fSource code :
{within [set` Interval -oo%O (BSide bb b)], continuous f} <->
({in `]-oo, b[, continuous f} /\ (~~ bb -> f @ b^'- --> f b)).
Proof.
have Fb : Filter b^'- by exact: at_left_proper_filter.
split=> [|bbT]; [| apply/cvg_ballP => e e0].
- apply/in_continuous_mksetP; rewrite -continuous_open_subspace//.
by apply: continuous_subspaceW cf; apply: subset_itvl; rewrite bnd_simp.
- move: bbT cf => /negbTE -> cf.
by apply: (@near_at_left -oo%O) => //; rewrite bnd_simp.
case=> ctsoo ctsR.
apply/subspace_continuousP => x /=.
rewrite in_itv/= => xb.
move: ctsR.
have : b = x /\ bb = false \/ x < b.
clear - xb. case: bb xb => /=; first by right.
by case: ltgtP => //; [right|left].
case=> [[<- ->]|{}xb].
- move=> /(_ erefl) /cvg_at_left_within; apply: cvg_trans.
apply: cvg_app; apply: within_subset.
by move=> ? /= /itvP ->.
- move=> _; have aboox : x \in `]-oo, b[ by rewrite !in_itv/= xb.
rewrite within_interior; last exact: ctsoo.
suff : `]-oo, b[ `<=` [set` Interval -oo%O (BSide bb b)]° by exact.
rewrite -open_subsetE; first exact: interval_open.
by apply: subset_itvl; rewrite bnd_simp.
Qed.
Lemma continuous_within_itvNycPUsed by
- mathcomp.analysis.probability_theory.normal_distribution
- mathcomp.analysis.ftc
Source code bSource code fSource code :
{within `]-oo, b], continuous f} <->
{in `]-oo, b[, continuous f} /\ f x @[xSource code --> b^'-] --> f b.
Proof.
by apply/propeqP; congr and; apply/propeqP; split=> // /(_ erefl).
Qed.
End continuous_within_itvP.
#[deprecated(since="analysis 1.19.0", note="Use continuous_within_itvccP instead.")]
Notation continuous_within_itvPSource code := continuous_within_itvccP (only parsing).
Lemma within_continuous_continuousUsed by
- mathcomp.analysis.ftc
Source code {RSource code : realFieldType} {KSource code : numDomainType}
{USource code : pseudoMetricType K} aSource code bSource code (baSource code bbSource code : bool) (fSource code : R -> U) xSource code : (a <= b)%R ->
{within [set` Interval (BSide ba a) (BSide bb b)], continuous f} ->
x \in `]a, b[%R -> {for x, continuous f}.
Proof.
by rewrite itv_ge ?bnd_simp.
by move=> /continuous_within_itvbbP -/(_ ab)[+ _ _]; exact.
Qed.