Module mathcomp.analysis.topology_theory.metric_structure
From HB Require Import structures.From mathcomp Require Import all_ssreflect_compat 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 mathcomp_extra boolp classical_sets.
From mathcomp Require Import contra reals topology_structure.
From mathcomp Require Import uniform_structure pseudometric_structure.
From mathcomp Require Import num_topology product_topology separation_axioms.
Set SsrOldRewriteGoalsOrder.
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_lemmas.
Context { : realFieldType} ( : metricType R).
Let
Lemma
Proof.
Lemma
Proof.
rewrite addr0 leNgt; apply/negP => exx.
by have := @ball_center _ _ x (PosNum e0); rewrite ballEmdist/= ltNge (ltW exx).
Qed.
Lemma
Proof.
Lemma
Proof.
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_lemmas.
.
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
f @ F --> y <-> forall
Proof.
Lemma
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
f @ F --> y <-> forall
Proof.
End at_left_right_metricType.
End metricType_numDomainType.
Section cvg_nbhsP.
Variables ( : realType) ( : metricType R).
Import metricType_numDomainType.
Lemma
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
Source code
(forall : nat -> V, (u n @[ --> \oo] --> p) -> f (u n) @[ --> \oo] --> l).
Proof.
apply/cvgrPdist_le => e /fpl.
rewrite -filter_from_mdist_nbhs => -[d d0 pdf].
by apply: filterS (uyp d d0) => t /pdf.
apply: contrapT => fpl; move: pfl; apply/existsNP.
suff: exists2 : nat -> V,
x n @[ --> \oo] --> p & ~ f (x n) @[ --> \oo] --> l.
by move=> [x_] hp; exists x_; exact/not_implyP.
have [e He] : exists : {posnum R}, forall : {posnum R},
exists , mdist xn p < d%:num /\ mdist (f xn) l >= e%:num.
apply: contrapT; apply: contra_not fpl => /forallNP h.
apply/cvgrPdist_le => e e0; have /existsNP[d] := h (PosNum e0).
move/forallNP => {}h; near=> t.
have /not_andP[abs|/negP] := h t.
- absurd: abs.
near: t.
rewrite !near_simpl /prop_near1 -nbhs_nbhs_mdist.
by exists d%:num => //= z/=; rewrite metric_sym.
- by rewrite -ltNge metric_sym => /ltW.
exists (fun => sval (cid (He n.+1%:R^-1%:pos))).
apply/cvgrPdist_lt => r r0; near=> t.
rewrite /sval/=; case: cid => x [xpt _].
rewrite metric_sym (lt_le_trans xpt)//.
rewrite -[leRHS]invrK lef_pV2 ?posrE ?invr_gt0//.
near: t; exists (truncn r^-1) => // s /= rs.
by apply/ltW; rewrite -truncn_le_nat.
move=> /cvgrPdist_lt/(_ e%:num (ltac:(by [])))[] n _ /(_ _ (leqnn _)).
rewrite /sval/=; case: cid => // x [px xpn].
by rewrite ltNge metric_sym => /negP.
Unshelve. all: end_near. Qed.
End cvg_nbhsP.
Section cvg_at_right_left_dnbhs.
Variables ( : realFieldType) ( : metricType R).
Import metricType_numDomainType.
Lemma
- mathcomp.analysis.ftc
- mathcomp.analysis.realfun
Source code
f x @[ --> p^'+] --> l -> f x @[ --> p^'-] --> l ->
f x @[ --> p^'] --> l.
Proof.
have {fppl}[a /= a0 fppl] := fppl (at_right_proper_filter p) _ e0.
have {fpnl}[b /= b0 fpnl] := fpnl (at_left_proper_filter p) _ e0.
near=> t.
have : t != p by near: t; exact: nbhs_dnbhs_neq.
rewrite neq_lt => /orP[tp|pt].
- apply: fpnl => //=; near: t.
exists (b / 2) => //=; first by rewrite divr_gt0.
move=> z/= + _ => /lt_le_trans; apply.
by rewrite ler_pdivrMr// ler_pMr// ler1n.
- apply: fppl =>//=; near: t.
exists (a / 2) => //=; first by rewrite divr_gt0.
move=> z/= + _ => /lt_le_trans; apply.
by rewrite ler_pdivrMr// ler_pMr// ler1n.
Unshelve. all: by end_near. Qed.
End cvg_at_right_left_dnbhs.