Module mathcomp.analysis.topology_theory.nat_topology
From HB Require Import structures.From mathcomp Require Import boot order algebra all_classical.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import reals topology_structure uniform_structure.
From mathcomp Require Import pseudometric_structure order_topology.
From mathcomp Require Import discrete_topology.
# Topology for natural numbers
Natural numbers `nat` are endowed with the structure of topology.
Import Order.TTheory GRing.Theory Num.Theory.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code hasNbhsSource code.Build nat principal_filter.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code Discrete_ofNbhsSource code.Build nat erefl.
Local Lemma nat_nbhs_itvSource code (nSource code : nat) :
nbhs n = filter_from
(fun iSource code => itv_open_ends i /\ n \in i)
(fun iSource code => [set` i]).
Proof.
rewrite nbhs_principalE eqEsubset; split=> U; first last.
by case => V [_ Vb] VU; apply/principal_filterP/VU; apply: Vb.
move/principal_filterP; case: n.
move=> U0; exists `]-oo, 1[; first split => //.
by move=> r /=; rewrite in_itv /=; case: r.
move=> n USn; exists `]n, n.+2[; first split => //.
by rewrite in_itv; apply/andP;split => //=; rewrite /Order.lt //=.
move=> r /=; rewrite in_itv /= => nr2; suff: r = n.+1 by move=> ->.
exact/esym/le_anti.
Qed.
by case => V [_ Vb] VU; apply/principal_filterP/VU; apply: Vb.
move/principal_filterP; case: n.
move=> U0; exists `]-oo, 1[; first split => //.
by move=> r /=; rewrite in_itv /=; case: r.
move=> n USn; exists `]n, n.+2[; first split => //.
by rewrite in_itv; apply/andP;split => //=; rewrite /Order.lt //=.
move=> r /=; rewrite in_itv /= => nr2; suff: r = n.+1 by move=> ->.
exact/esym/le_anti.
Qed.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code Order_isNbhsSource code.Build _ nat nat_nbhs_itv.
HBSource code.instanceSource code DefinitionSource code _Source code :=Source code DiscreteUniform_ofNbhsSource code.Build nat.
HBSource code.instanceSource code DefinitionSource code _Source code {RSource code :Source code numDomainType}Source code :=
@DiscretePseudoMetric_ofUniform.Build R nat.
Lemma nbhs_infty_gtUsed by
- mathcomp.analysis.sequences
- mathcomp.analysis.normedtype_theory.ereal_normedtype
Source code NSource code : \forall nSource code \near \oo, (N < n)%N.
Proof.
Lemma nbhs_infty_geUsed by
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_under
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis_stdlib.Rstruct_topology
Source code NSource code : \forall nSource code \near \oo, (N <= n)%N.
Proof.
by exists N. Qed.
Lemma nbhs_infty_gerUsed by
- mathcomp.analysis.probability_theory.random_variable
- mathcomp.analysis.realfun
- mathcomp.analysis.ftc
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.lebesgue_integral_differentiation
- mathcomp.analysis.normedtype_theory.ereal_normedtype
- mathcomp.analysis.normedtype_theory.num_normedtype
- mathcomp.analysis.exp
Source code {RSource code : realType} (rSource code : R) :
\forall nSource code \near \oo, (r <= n%:R)%R.
Lemma cvg_addnlSource code NSource code : addn N @ \oo --> \oo.
Lemma cvg_addnrUsed by
- mathcomp.analysis.sequences
- mathcomp.analysis.lebesgue_integral_theory.radon_nikodym
Source code NSource code : addn^~ N @ \oo --> \oo.
Lemma cvg_subnrUsed by
- mathcomp.analysis.sequences
Source code NSource code : subn^~ N @ \oo --> \oo.
Proof.
Lemma cvg_mulnlSource code NSource code : (N > 0)%N -> muln N @ \oo --> \oo.
Proof.
Lemma cvg_mulnrSource code NSource code :(N > 0)%N -> muln^~ N @ \oo --> \oo.
Lemma cvg_divnrSource code NSource code : (N > 0)%N -> divn^~ N @ \oo --> \oo.
Proof.
Lemma near_inftySUsed by
- mathcomp.analysis.sequences
Source code (PSource code : set nat) :
(\forall xSource code \near \oo, P x.+1) -> (\forall xSource code \near \oo, P x).
Lemma near_infty_leqUsed by
- mathcomp.analysis.sequences
Source code (PSource code : set nat) :
(\forall nSource code \near \oo, P n) <->
(\forall NSource code \near \oo, forall nSource code, (n >= N)%N -> P n).
Proof.
Section infty_nat.
Local Open Scope nat_scope.
Let cvgnyPSource code {FSource code : set_system nat} {FFSource code : Filter F} : [<->
F --> \oo;
forall ASource code, \forall xSource code \near F, A <= x;
forall ASource code, \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.
tfae; first by move=> Foo A; apply: Foo; apply: nbhs_infty_ge.
- move=> AF A; near \oo => B; near=> x.
suff : (B <= x)%N by apply: leq_trans; near: B; apply: nbhs_infty_gt.
by near: x; apply: AF; near: B.
- by move=> Foo; near do apply: Foo.
- by apply: filterS => ?; apply: filterS => ?; apply: ltnW.
case=> [A _ AF] P [n _ Pn]; near \oo => B; near=> m; apply: Pn => /=.
suff: (B <= m)%N by apply: leq_trans; near: B; apply: nbhs_infty_ge.
by near: m; apply: AF; near: B; apply: nbhs_infty_ge.
Unshelve. all: end_near. Qed.
- move=> AF A; near \oo => B; near=> x.
suff : (B <= x)%N by apply: leq_trans; near: B; apply: nbhs_infty_gt.
by near: x; apply: AF; near: B.
- by move=> Foo; near do apply: Foo.
- by apply: filterS => ?; apply: filterS => ?; apply: ltnW.
case=> [A _ AF] P [n _ Pn]; near \oo => B; near=> m; apply: Pn => /=.
suff: (B <= m)%N by apply: leq_trans; near: B; apply: nbhs_infty_ge.
by near: m; apply: AF; near: B; apply: nbhs_infty_ge.
Unshelve. all: end_near. Qed.
Section map.
Context {ISource code : Type} {FSource code : set_system I} {FFSource code : Filter F} (fSource code : I -> nat).
Lemma cvgnyPgeUsed by
- mathcomp.analysis.normedtype_theory.num_normedtype
Source code :
f @ F --> \oo <-> forall ASource code, \forall xSource code \near F, A <= f x.
Proof.
Lemma cvgnyPgtUsed by
- mathcomp.analysis.sequences
Source code :
f @ F --> \oo <-> forall ASource code, \forall xSource code \near F, A < f x.
Proof.
Lemma cvgnyPgtySource code :
f @ F --> \oo <-> \forall ASource code \near \oo, \forall xSource code \near F, A < f x.
Proof.
Lemma cvgnyPgeySource code :
f @ F --> \oo <-> \forall ASource code \near \oo, \forall xSource code \near F, A <= f x.
Proof.
End map.
End infty_nat.