Module mathcomp.analysis.topology_theory.metric_structure
From HB Require Import structures.From mathcomp Require Import boot order ssralg ssrint ssrnum matrix.
From mathcomp Require Import interval_inference rat interval zmodp vector.
From mathcomp Require Import fieldext falgebra archimedean finmap.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import boolp classical_sets contra reals.
From mathcomp Require Import topology_structure uniform_structure
pseudometric_structure num_topology product_topology separation_axioms.
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.
.
mdist : M -> M -> K ;
mdist_ge0 : forall , 0 <= mdist x y ;
mdist_positivity : forall , mdist x y = 0 -> x = y;
ballEmdist : forall , ball x d = [set | mdist x y < d]
}.
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
- mathcomp.analysis.normedtype_theory.pseudometric_normed_Zmodule
Source code
{ of PseudoMetric K M & PseudoMetric_isMetric K M }.
Section metric_numDomainType.
Context { : numDomainType} ( : metricType R).
Let
Lemma
Proof.
by apply: real_comparable; apply: ger0_real; exact: mdist_ge0.
apply/eqP; rewrite eq_le; apply/andP; split.
- rewrite comparable_leNgt//; apply/negP => xy.
have := @ball_sym _ _ y x (dist x y); rewrite !ballEmdist/= => /(_ xy).
by rewrite ltxx.
- rewrite comparable_leNgt//; first by rewrite comparable_sym.
apply/negP => xy.
have := @ball_sym _ _ x y (dist y x); rewrite !ballEmdist/= => /(_ xy).
by rewrite ltxx.
Qed.
Lemma
Proof.
Lemma
Proof.
End metric_numDomainType.
Section metric_numFieldType.
Context { : numFieldType} ( : metricType R).
Let
Lemma
Proof.
by rewrite real_comparable// ger0_real ?addr_ge0// mdist_ge0.
rewrite (comparable_leNgt c); apply/negP => xy.
set e := dist x z - (dist x y + dist y z).
have e0 : 0 < e by rewrite subr_gt0.
have e20 : 0 < e / 2 by rewrite divr_gt0.
have xe2y : ball x (dist x y + e / 2) y by rewrite ballEmdist/= ltrDl.
have ye2z : ball y (dist y z + e / 2) z by rewrite ballEmdist/= ltrDl.
have := ball_triangle xe2y ye2z.
by rewrite ballEmdist/= addrACA -splitr subrKC ltxx.
Qed.
Lemma
Proof.
pose D := dist p q / 2; have D0 : 0 < D.
by rewrite divr_gt0// mdist_gt0.
have p2Dq : ~ ball p (dist p q) q by rewrite ballEmdist/= ltxx.
move=> /(_ (ball p _) (ball q _) (nbhsx_ballx _ _ D0) (nbhsx_ballx _ _ D0)).
move/set0P/eqP; apply; rewrite -subset0 => x [pDx /ball_sym qDx].
by have := ball_triangle pDx qDx; rewrite -splitr.
Qed.
End metric_numFieldType.
Section prod_metric.
Context { : numDomainType} ( : metricType K).
Let := (T * U)%type.
Let
Proof.
Definition
Source code
Let
Proof.
Let
Proof.
have le01 : mdist x.1 y.1 <= 0 by rewrite -m0 comparable_le_max// lexx.
have le02 : mdist x.2 y.2 <= 0 by rewrite -m0 comparable_le_max// lexx orbT.
have eq01 : mdist x.1 y.1 = 0 by apply/le_anti; rewrite le01 mdist_ge0.
have eq02 : mdist x.2 y.2 = 0 by apply/le_anti; rewrite le02 mdist_ge0.
rewrite (surjective_pairing x) (surjective_pairing y).
by congr pair; exact: mdist_positivity.
Qed.
Let
Proof.
rewrite !ballEmdist/= /prod_mdist => b1 b2.
by rewrite comparable_gt_max// b1 b2.
rewrite /ball/= /prod_ball/= !ballEmdist/=.
by apply/andP; rewrite -comparable_gt_max.
Qed.
.
prod_mdist_ge0 prod_mdist_positivity ballEprod_mdist.
End prod_metric.
.
mdist : M -> M -> K ;
mdistxx : forall , mdist x x = 0 ;
mdist_positivity : forall , mdist x y = 0 -> x = y ;
mdist_sym : forall , mdist x y = mdist y x ;
mdist_triangle : forall , mdist x z <= mdist x y + mdist y z
}.
.
Let
Let
Let
Let
Proof.
.
Let
Let
Let
ball x (e1 + e2) z.
Proof.
Let
Proof.
.
ent nbhsE ball ball_center ball_sym ball_triangle entourageE.
Let
Proof.
by rewrite (le_trans (mdist_triangle y _ _))// mdist_sym -mulr2n.
Qed.
Let
Proof.
.
mdist_ge0 mdist_positivity ballEmdist.
.
Section numFieldType_metric.
Context { : numFieldType}.
Implicit Type x y : R.
Let
Let
Proof.
Let
Proof.
Let
.
End numFieldType_metric.
Module
Section metricType_numDomainType.
Context { : numDomainType} { : metricType K}.
Local Notation
Lemma
Proof.
Local Notation
Lemma
Proof.
Lemma
Proof.
Lemma
filter_from (fun : K => 0 < i) (fun ( : K) ( : V) => mdist y y' < i)
= nbhs y.
Proof.
by move=> [x x0 yxA]; exists x => //; rewrite ballEmdist.
by move=> [x x0 yxA]; exists x => //; rewrite ballEmdist in yxA.
Qed.
Let
Lemma
F --> y <-> forall
Proof.
Lemma
- mathcomp.analysis.ereal
Source code
f @ F --> y <-> forall
Proof.
Lemma
- mathcomp.analysis.ereal
Source code
f @ F --> y -> forall
Proof.
Lemma
f @ F --> y -> forall
Proof.
End metricType_numDomainType.
Section at_left_right_metricType.
Variables ( : numFieldType) ( : metricType R).
Lemma
(\forall \near x, P y) <->
(\forall \near 0^'+, forall , mdist x y <= e -> P y).
Proof.
split.
move => /nbhs_mdistP[/= _/posnumP[e] /(_ _) Px].
apply/(@nbhs_mdistP R R^o).
exists e%:num => //= r /= re yr y xyr.
apply: Px => /=.
rewrite (le_lt_trans _ re)//.
rewrite (le_trans xyr)//.
by rewrite /mdist/= subr0 real_ler_norm// gtr0_real.
move => /(@nbhs_mdistP R R^o)[/= _/posnumP[e] /(_ _) Px].
apply/(@nbhs_mdistP R V).
exists (e%:num / 2) => //= r /= re; apply: (Px (e%:num / 2)) => //=.
by rewrite /mdist/= subr0 gtr0_norm// ltr_pdivrMr// ltr_pMr// ltr1n.
by rewrite ltW.
Qed.
Let
F --> y;
forall
\forall
\forall
Proof.
- by move=> Fy; near do apply: Fy; apply: nbhs_right_gt.
- move=> Fy; near=> e; near (0:R)^'+ => d; near=> x.
rewrite (@le_lt_trans _ _ d)//; first by near: x; near: d.
by near: d; apply: nbhs_right_lt; near: e; apply: nbhs_right_gt.
- move=> Fy; apply/cvgrPdist_lt => e e_gt0; near (0:R)^'+ => d.
near=> x; rewrite (@lt_le_trans _ _ d)//; first by near: x; near: d.
by near: d; apply: nbhs_right_le.
Unshelve. all: by end_near. Qed.
Lemma
- mathcomp.analysis.topology_theory.edist
Source code
f @ F --> y <-> forall
Proof.
End at_left_right_metricType.
End metricType_numDomainType.
Section at_left_rightR.
Variable ( : numFieldType).
f @ F --> y <-> forall
Proof.
by under eq_forall do under eq_near do rewrite /mdist/= (@distrC _ R^o).
Qed.
f @ F --> y -> forall
Proof.
Lemma
y \is Num.real -> f @ F --> y ->
forall , z > y -> \forall \near F, f t \is Num.real -> f t < z.
Proof.
rewrite -(ltrD2r (- y)) real_ltr_normlW// ?rpredB// distrC.
by near: x; apply: cvgr_distC_lt => //; rewrite subr_gt0.
Unshelve. all: by end_near. Qed.
Lemma
y \is Num.real -> f @ F --> y ->
forall , z > y -> \forall \near F, f t \is Num.real -> f t <= z.
Proof.
Lemma
y \is Num.real -> f @ F --> y ->
forall , y > z -> \forall \near F, f t \is Num.real -> f t > z.
Proof.
rewrite -ltrN2 -(ltrD2l y) real_ltr_normlW// ?rpredB// distrC.
by near: x; apply: (@metricType_numDomainType.cvgr_dist_lt _ R^o) => //; rewrite subr_gt0.
Unshelve. all: by end_near. Qed.
Lemma
y \is Num.real -> f @ F --> y ->
forall , z < y -> \forall \near F, f t \is Num.real -> f t >= z.
Proof.
End at_left_rightR.
Arguments real_cvgr_le {R T F FF f}.
Arguments real_cvgr_lt {R T F FF f}.
Arguments real_cvgr_ge {R T F FF f}.
Arguments real_cvgr_gt {R T F FF f}.
Section squeeze_cvgr.
Context { : Type} { : set_system T} { : Filter F} { : realFieldType}.
Implicit Types f g h : T -> R.
Lemma
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.derive
- mathcomp.analysis.realfun
Source code
f @ F --> y -> forall , z > y -> \forall \near F, f t < z.
Proof.
by near: x; apply: (@metricType_numDomainType.cvgr_dist_lt _ R^o) => //; rewrite subr_gt0.
Unshelve. all: by end_near. Qed.
Lemma
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.realfun
Source code
f @ F --> y -> forall , y > z -> \forall \near F, f t > z.
Proof.
by near: x; apply: (@metricType_numDomainType.cvgr_dist_lt _ R^o) => //; rewrite subr_gt0.
Unshelve. all: by end_near. Qed.
Lemma
- mathcomp.analysis.derive
Source code
f @ F --> y -> forall , z > y -> \forall \near F, f t <= z.
Lemma
- mathcomp.analysis.normedtype_theory.normed_module
Source code
f @ F --> y -> forall , z < y -> \forall \near F, f t >= z.
Lemma
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.gauss_integral
- mathcomp.analysis.normedtype_theory.normed_module
- mathcomp.analysis.normedtype_theory.tvs
Source code
forall : R, f @ F --> l -> h @ F --> l -> g @ F --> l.
Proof.
apply/(@metricType_numDomainType.cvgrPdist_lt R R^o) => e e_gt0.
near=> x; have /(_ _)/andP[//|fg gh] := near fgh x.
rewrite ltr_distl (lt_le_trans _ fg) ?(le_lt_trans gh)//=.
by near: x; apply: (cvgr_gt lfa); rewrite // gtrDl oppr_lt0.
by near: x; apply: (cvgr_lt lga); rewrite // ltrDl.
Unshelve. all: end_near. Qed.
End squeeze_cvgr.
Arguments cvgr_lt {T F FF R f}.
Arguments cvgr_gt {T F FF R f}.
Arguments cvgr_le {T F FF R f}.
Arguments cvgr_ge {T F FF R f}.
Arguments squeeze_cvgr {T F FF R} f g h.