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.
Unset SsrOldRewriteGoalsOrder.
Import Order.TTheory GRing.Theory Num.Theory.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
.
instance
Source code
Source code
Definition
Source code
Source code
hasNbhs
Source code
.Build nat principal_filter.Source code
.
instance
Source code
Source code
Definition
Source code
Source code
Discrete_ofNbhs
Source code
.Build nat erefl.Source code
Local Lemma
nat_nbhs_itv
Source code
( : nat) :Source code
nbhs n = filter_from
(fun => itv_open_ends i /\ n \in i)
(fun => [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.
.
instance
Source code
Source code
Definition
Source code
Source code
Order_isNbhs
Source code
.Build _ nat nat_nbhs_itv.Source code
.
instance
Source code
Source code
Definition
Source code
Source code
DiscreteUniform_ofNbhs
Source code
.Build nat.Source code
.
instance
Source code
Source code
Definition
Source code
Source code
numDomainType}
Source code
:=Source code
@DiscretePseudoMetric_ofUniform.Build R nat.
Lemma
nbhs_infty_gt
Source code
: \forall \near \oo, (N < n)%N.Source code
Proof.
Lemma
nbhs_infty_ge
Source code
: \forall \near \oo, (N <= n)%N.Source code
Proof.
by exists N. Qed.
Lemma
nbhs_infty_ger
Source code
{ : realType} ( : R) :Source code
\forall \near \oo, (r <= n%:R)%R.
Lemma
cvg_addnl
Source code
: addn N @ \oo --> \oo.Source code
Lemma
cvg_addnr
Source code
: addn^~ N @ \oo --> \oo.Source code
Lemma
cvg_subnr
Source code
: subn^~ N @ \oo --> \oo.Source code
Proof.
Lemma
cvg_mulnl
Source code
: (N > 0)%N -> muln N @ \oo --> \oo.Source code
Proof.
Lemma
cvg_mulnr
Source code
:(N > 0)%N -> muln^~ N @ \oo --> \oo.Source code
Lemma
cvg_divnr
Source code
: (N > 0)%N -> divn^~ N @ \oo --> \oo.Source code
Proof.
Lemma
near_inftyS
Source code
( : set nat) :Source code
(\forall \near \oo, P (S x)) -> (\forall \near \oo, P x).
Section infty_nat.
Local Open Scope nat_scope.
Let
cvgnyP
Source code
{ : set_system nat} { : Filter F} : [<->Source code
F --> \oo;
forall , \forall \near F, A <= x;
forall , \forall \near F, A < x;
\forall \near \oo, \forall \near F, A < x;
\forall \near \oo, \forall \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 { : Type} { : set_system I} { : Filter F} ( : I -> nat).
Lemma
cvgnyPge
Source code
:Source code
f @ F --> \oo <-> forall , \forall \near F, A <= f x.
Proof.
Lemma
cvgnyPgt
Source code
:Source code
f @ F --> \oo <-> forall , \forall \near F, A < f x.
Proof.
Lemma
cvgnyPgty
Source code
:Source code
f @ F --> \oo <-> \forall \near \oo, \forall \near F, A < f x.
Proof.
Lemma
cvgnyPgey
Source code
:Source code
f @ F --> \oo <-> \forall \near \oo, \forall \near F, A <= f x.
Proof.
End map.
End infty_nat.