Module mathcomp.analysis.topology_theory.num_topology
From HB Require Import structures.From mathcomp Require Import all_ssreflect_compat all_algebra all_classical.
From mathcomp Require Import interval_inference reals topology_structure.
From mathcomp Require Import uniform_structure pseudometric_structure.
From mathcomp Require Import order_topology matrix_topology.
Import Order.TTheory GRing.Theory Num.Theory.
Set SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
.
(nbhs_ball_ (ball_ (fun => `|x|))).
Module
Section TopologicalNumDomainType.
Variable ( : numDomainType).
Lemma
Proof.
by move=> [] e e0 /subsetP/(_ p); rewrite !in_setE/= subrr normr0.
split=> [|P Q|P Q].
- by exists 1; [exact: ltr01|exact: subsetT].
- move=> [] /= e e0 /subsetP eP [] /= f f0 /subsetP fQ.
exists (Order.min e f) => /=.
by rewrite [Num.min e f]/(Order.min e f); case: ifP.
apply/subsetP => x.
rewrite in_setE in_setI/= => pef.
apply/andP; split.
apply/eP/mem_set/(lt_le_trans pef).
by case: (@real_ltP _ e f) => //; exact: gtr0_real.
apply/fQ/mem_set/(lt_le_trans pef).
by case: (@real_ltP _ f e) => //; exact: gtr0_real.
- move=> PQ [] /= e e0 eP.
by exists e => //; exact: (subset_trans eP).
Qed.
Lemma
Lemma
Proof.
End TopologicalNumDomainType.
End TopologicalNumDomainType.
.
(@TopologicalNumDomainType.nbhs_filter R)
(@TopologicalNumDomainType.nbhs_singleton R)
(@TopologicalNumDomainType.nbhs_nbhs R).
.
nbhs_ball_normE ball_norm_center ball_norm_symmetric ball_norm_triangle erefl.
.
Uniform_isPseudoMetric.Build R R^o
ball_norm_center ball_norm_symmetric ball_norm_triangle erefl.
Lemma
filter_from (fun => itv_open_ends i /\ x \in i) (fun => [set` i]).
Proof.
case => _ /posnumP[e] xeU.
exists (`]x - e%:num, x + e%:num[); first split => //.
by rewrite in_itv/= -lter_distl subrr normr0.
apply: subset_trans xeU => z /=.
by rewrite in_itv /= -lter_distl distrC.
case => [][[[]l|[]]] [[]r|[]] []//= _.
- move=> xlr lrU; exists (Order.min (x - l) (r - x)).
by rewrite /= lt_min ?lterBDr ?add0r ?(itvP xlr).
apply/(subset_trans _ lrU)/subset_ball_prop_in_itv.
suff : (`]x - Order.min (x - l) (r - x), x + Order.min (x - l) (r - x)[
<= `]l, r[)%O by move/subitvP => H ? ?; exact: H.
rewrite subitvE 2!lteBSide/=.
by rewrite lerBrDl [_ + l]addrC -2!lerBrDl 2!ge_min 2!lexx orbT.
- move=> xl lU; exists (x - l) => /=; first by rewrite lterBDr add0r (itvP xl).
apply/(subset_trans _ lU)/subset_ball_prop_in_itv.
suff : (`]x - (x - l), x + (x - l)[ <= `]l, +oo[)%O.
by move/subitvP => + ?; exact.
by rewrite subitvE lteBSide/= subKr lexx.
- move=> xr rU; exists (r - x) => /=; first by rewrite lterBDr add0r (itvP xr).
apply/(subset_trans _ rU)/subset_ball_prop_in_itv.
suff : (`]x - (r - x), x + (r - x)[ <= `]-oo, r[)%O.
by move/subitvP => + ?; exact.
by rewrite subitvE lteBSide/= addrC subrK.
- by move=> _; rewrite set_itvE subTset => ->; exists 1 => /=.
Qed.
Module
.
.
.
.
.
PseudoPointedMetric.copy R R^o.
.
.
Order_isNbhs.Build _ R (@real_order_nbhsE R).
.
Order_isNbhs.Build _ R (@real_order_nbhsE R).
Module
- mathcomp.analysis.topology_theory.separation_axioms
- mathcomp.analysis.normedtype_theory.normed_module
Source code
End numFieldTopology.
Import numFieldTopology.Exports.
Reserved Notation "x ^'+" (at level 3, left associativity, format "x ^'+").
Reserved Notation "x ^'-" (at level 3, left associativity, format "x ^'-").
Section at_left_right.
Variable : numFieldType.
Definition
Used by
- mathcomp.analysis.derive
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Definition
Used by
- mathcomp.analysis.lebesgue_stieltjes_measure
- mathcomp.analysis.derive
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Local Notation
Local Notation
Global Instance
- mathcomp.analysis.topology_theory.metric_structure
- mathcomp.analysis.ftc
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Global Instance
- mathcomp.analysis.topology_theory.metric_structure
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
f x @[ --> p^'] --> l -> f x @[ --> p^'+] --> l.
Proof.
Lemma
f x @[ --> p^'] --> l -> f x @[ --> p^'-] --> l.
Proof.
Lemma
- mathcomp.analysis.topology_theory.metric_structure
- mathcomp.analysis.ftc
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.topology_theory.metric_structure
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.ftc
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
Source code
Proof.
Lemma
- mathcomp.analysis.ftc
- mathcomp.analysis.realfun
Source code
Proof.
by apply: nbhs_right_lt; rewrite ltrDr.
Unshelve. all: by end_near. Qed.
Lemma
- mathcomp.analysis.topology_theory.metric_structure
- mathcomp.analysis.ftc
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.exp
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
Proof.
Lemma
- mathcomp.analysis.realfun
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
~ (\forall \near p^'+, P x) <->
forall : {posnum R}, exists2 , p < x < p + e%:num & ~ P x.
Proof.
- apply: contrapT => /forallPNP peP; apply: pPf; near=> t.
apply: contrapT; apply: peP; apply/andP; split.
+ by near: t; exact: nbhs_right_gt.
+ by near: t; apply: nbhs_right_lt; rewrite ltrDl.
- rewrite /at_right near_withinE nearE.
rewrite -filter_from_ballE /filter_from/= -forallPNP => _ /posnumP[d].
have [x /andP[px xpd] notPx] := ex_notPx d; rewrite -existsNP; exists x => /=.
apply: contra_not notPx; apply => //.
by rewrite /ball/= ltr0_norm ?subr_lt0// opprB ltrBlDl.
Unshelve. all: by end_near. Qed.
End at_left_right.
#[global] Typeclasses Opaque at_left at_right.
Notation
Notation
#[global] Hint Extern 0 (Filter (nbhs _^'+)) =>
(apply: at_right_proper_filter) : typeclass_instances.
#[global] Hint Extern 0 (Filter (nbhs _^'-)) =>
(apply: at_left_proper_filter) : typeclass_instances.
Lemma
- mathcomp.analysis.ftc
- mathcomp.analysis.realfun
Source code
( : R -> T) :
f @ x^'- --> f x /\ f @ x^'+ --> f x <-> f @ x --> f x.
Proof.
move=> [+ +] U /= Uz => /(_ U Uz) + /(_ U Uz); near_simpl.
rewrite !near_withinE => lf rf; apply: filter_app lf; apply: filter_app rf.
near=> t => xlt xgt; have := @real_leVge R x t; rewrite !num_real.
move=> /(_ isT isT) /orP; rewrite !le_eqVlt => -[|] /predU1P[|//].
- by move=> <-; exact: nbhs_singleton.
- by move=> ->; exact: nbhs_singleton.
Unshelve. all: by end_near. Qed.
Lemma
- mathcomp.analysis.normedtype_theory.normed_module
Source code
A !=set0 -> has_ubound A -> closure A (sup A).
Proof.
rewrite closure_isolated_limit_point.
right => U /nbhs_ballP[_ /posnumP[e]] supAeU.
suff [x [Ax /andP[sAex xsA]]] : exists , A x /\ sup A - e%:num < x < sup A.
exists x; split => //; first by rewrite lt_eqF.
apply supAeU; rewrite /ball /= ltr_distl (addrC x e%:num) -ltrBlDl sAex.
by rewrite andbT (le_lt_trans _ xsA) // lerBlDl lerDr.
apply: contrapT => /forallNP Ax.
suff /(ge_sup A0) : ubound A (sup A - e%:num).
by rewrite leNgt => /negP; apply; rewrite ltrBlDl ltrDr.
move=> y Ay; have /not_andP[//|/negP] := Ax y.
rewrite negb_and leNgt => /orP[//|]; apply: contra => sAey.
rewrite lt_neqAle sup_upper_bound // andbT.
by apply: contra_not_neq AsupA => <-.
Qed.
Lemma
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code
has_ubound X -> X° `<=` [set | r < sup X].
Proof.
rewrite le_eqVlt => /orP[/eqP supXr|]; last first.
by apply/negP; rewrite -leNgt ub_le_sup//; exact: interior_subset.
suff : ~ X° (sup X) by rewrite supXr.
case/nbhs_ballP => _/posnumP[e] supXeX.
have [f XsupXf] : exists : {posnum R}, X (sup X + f%:num).
exists (e%:num / 2)%:pos; apply supXeX; rewrite /ball /= opprD addNKr normrN.
by rewrite gtr0_norm // ltr_pdivrMr // ltr_pMr // ltr1n.
have : sup X + f%:num <= sup X by exact: ub_le_sup.
by apply/negP; rewrite -ltNge; rewrite ltrDl.
Qed.
Lemma
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code
has_lbound X -> X° `<=` [set | inf X < r].
Proof.
rewrite le_eqVlt => /orP[/eqP rinfX|]; last first.
by apply/negP; rewrite -leNgt ge_inf//; exact: interior_subset.
suff : ~ X° (inf X) by rewrite -rinfX.
case/nbhs_ballP => _/posnumP[e] supXeX.
have [f XsupXf] : exists : {posnum R}, X (inf X - f%:num).
exists (e%:num / 2)%:pos; apply supXeX; rewrite /ball /= opprB addrC subrK.
by rewrite gtr0_norm // ltr_pdivrMr // ltr_pMr // ltr1n.
have : inf X <= inf X - f%:num by exact: ge_inf.
by apply/negP; rewrite -ltNge; rewrite ltrBlDr ltrDl.
Qed.
Lemma
Proof.
Lemma
- mathcomp.analysis.ftc
Source code
( : T) :
(f \o -%R) x @[ --> a] --> l <-> f x @[ --> (- a)] --> l.
Proof.
Lemma
nbhs (- x) = [set -%R @` A | in nbhs x].
Proof.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
(\forall \near - x, P y) <-> \near , P (- x).
Proof.
Lemma
Proof.
Lemma
closed A -> closed [set - x | in A].
Proof.
suff /Acl : closure A (- x) by exists (- x)=> //; rewrite opprK.
move=> B oppx_B; have : [set - x | in A] `&` [set - x | in B] !=set0.
by apply: clNAx; rewrite -[x]opprK nbhsNimage; exists B.
move=> [y [[z Az oppzey] [t Bt opptey]]]; exists (- y).
by split; [rewrite -oppzey opprK|rewrite -opptey opprK].
Qed.
Lemma
- mathcomp.analysis.normedtype_theory.normed_module
Source code
(- r)%R^' = (fun => -%R @` A) @` r^'.
Proof.
exists (-%R @` A).
exists e => // x/= rxe xr; exists (- x)%R; rewrite ?opprK//.
by apply: reA; rewrite ?eqr_opp//= opprK addrC distrC.
rewrite image_comp (_ : _ \o _ = idfun) ?image_id// funeqE => x/=.
by rewrite opprK.
exists e => //= x/=; rewrite -opprD normrN => axe xa.
exists (- x)%R; rewrite ?opprK//; apply: reA; rewrite ?eqr_oppLR//=.
by rewrite opprK.
Qed.
Lemma
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
within A (nbhs (- r)) = - x @[ --> within (-%R @` A) (nbhs r)].
Proof.
Lemma
- mathcomp.analysis.ftc
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
( : interval T) ( : T -> U) :
{in i, continuous f} <-> {in [set` i], continuous f}.
Lemma
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
Source code
\forall \near nbhs (0%R:R), (r <= x)%R.
Proof.
Lemma
\forall \near nbhs (0%R:R), (r < x)%R.
Proof.
Lemma
\forall \near nbhs x, y < a.
Proof.
Lemma
x < t -> \forall \near nbhs x, y <= t.
Lemma
- mathcomp.analysis.ftc
Source code
- x < a -> \forall \near nbhs x, - y < a.
Proof.
Section nbhs_lt_le.
Context { : numFieldType}.
Implicit Types x z : R.
Lemma
Proof.
Lemma
- mathcomp.analysis.ftc
Source code
Proof.
End nbhs_lt_le.
#[deprecated(since="mathcomp-analysis 1.9.0", note="use `lt_nbhsl_lt` instead")]
Notation
#[deprecated(since="mathcomp-analysis 1.9.0", note="use `lt_nbhsl_le` instead")]
Notation
Lemma
- mathcomp.analysis.probability_theory.exponential_distribution
- mathcomp.analysis.exp
- mathcomp.analysis.realfun
Source code
\forall \near z, a < x.
Proof.
Lemma
t < x -> \forall \near nbhs x, t <= y.
Global Instance
ProperFilter x^'.
Proof.
Global Instance
- mathcomp.analysis.ereal
Source code
ProperFilter x^'.
Proof.
Lemma
- mathcomp.analysis.borel_hierarchy
- mathcomp.analysis.normedtype_theory.normed_module
Source code
Proof.
have /rat_in_itvoo[q /itvP qre] : r < r + e%:num by rewrite ltrDl.
exists (ratr q) => //; split; last by exists q.
apply: reA; rewrite /ball /= distrC ltr_distl qre andbT.
by rewrite (@le_lt_trans _ _ r)// ?qre// lerBlDl lerDr ltW.
Qed.
Lemma
- mathcomp.analysis.normedtype_theory.vitali_lemma
Source code
{ : realType} ( : Type) ( : I -> set R) ( : set I) :
(forall , open (B i)) -> (forall , B i !=set0) ->
trivIset D B -> countable D.
Proof.
{ : I -> rat & forall , D i -> B i (ratr (f i))}.
apply: (@choice _ _ (fun => D x -> B x (ratr y))) => i.
have [r [Bir [q _ qr]]] := dense_rat (B0 _) (oB i).
by exists q => Di; rewrite qr.
have inj_f : {in D &, injective f}.
move=> i j /[!inE] Di Dj /(congr1 ratr) ratrij.
have ? : (B i `&` B j) (ratr (f i)).
by split => //; [exact: fB|rewrite ratrij; exact: fB].
by apply/(tB _ _ Di Dj); exists (ratr (f i)).
apply/pcard_injP; have /card_bijP/cid[g bijg] := card_rat.
pose nat_of_rat ( : rat) : nat := set_val (g (to_setT q)).
have inj_nat_of_rat : injective nat_of_rat.
rewrite /nat_of_rat; apply: inj_comp => //; apply: inj_comp => //.
exact/bij_inj.
by exists (nat_of_rat \o f) => i j Di Dj /inj_nat_of_rat/inj_f; exact.
Qed.
Lemma
- mathcomp.analysis.derive
Source code
continuous (rsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n2)).
Proof.
apply/nbhs_ballP; exists e => //= v [_ uv]; apply: eA; split => // i j.
by apply: (le_lt_trans _ (uv i (rshift n1 j))); rewrite !mxE.
Qed.
Lemma
- mathcomp.analysis.derive
Source code
continuous (lsubmx : 'M[R]_(m, n1 + n2) -> 'M[R]_(m, n1)).
Proof.
apply/nbhs_ballP; exists e => //= v [_ uv]; apply: eA; split => // i j.
by apply: (le_lt_trans _ (uv i (lshift n2 j))); rewrite !mxE.
Qed.