Module docstring
{"# Topology on the natural numbers
The structure of a metric space on ℕ is introduced in this file, induced from ℝ.
"}
{"# Topology on the natural numbers
The structure of a metric space on ℕ is introduced in this file, induced from ℝ.
"}
Nat.instDist
instance
: Dist ℕ
noncomputable instance : Dist ℕ :=
⟨fun x y => dist (x : ℝ) y⟩
Nat.dist_eq
theorem
(x y : ℕ) : dist x y = |(x : ℝ) - y|
theorem dist_eq (x y : ℕ) : dist x y = |(x : ℝ) - y| := rfl
Nat.dist_coe_int
theorem
(x y : ℕ) : dist (x : ℤ) (y : ℤ) = dist x y
Nat.dist_cast_real
theorem
(x y : ℕ) : dist (x : ℝ) y = dist x y
Nat.pairwise_one_le_dist
theorem
: Pairwise fun m n : ℕ => 1 ≤ dist m n
theorem pairwise_one_le_dist : Pairwise fun m n : ℕ => 1 ≤ dist m n := fun _ _ hne =>
Int.pairwise_one_le_dist <| mod_cast hne
Nat.isUniformEmbedding_coe_real
theorem
: IsUniformEmbedding ((↑) : ℕ → ℝ)
theorem isUniformEmbedding_coe_real : IsUniformEmbedding ((↑) : ℕ → ℝ) :=
isUniformEmbedding_bot_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
Nat.isClosedEmbedding_coe_real
theorem
: IsClosedEmbedding ((↑) : ℕ → ℝ)
theorem isClosedEmbedding_coe_real : IsClosedEmbedding ((↑) : ℕ → ℝ) :=
isClosedEmbedding_of_pairwise_le_dist zero_lt_one pairwise_one_le_dist
Nat.instMetricSpace
instance
: MetricSpace ℕ
instance : MetricSpace ℕ := Nat.isUniformEmbedding_coe_real.comapMetricSpace _
Nat.preimage_ball
theorem
(x : ℕ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r
theorem preimage_ball (x : ℕ) (r : ℝ) : (↑) ⁻¹' ball (x : ℝ) r = ball x r := rfl
Nat.preimage_closedBall
theorem
(x : ℕ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r
theorem preimage_closedBall (x : ℕ) (r : ℝ) : (↑) ⁻¹' closedBall (x : ℝ) r = closedBall x r := rfl
Nat.closedBall_eq_Icc
theorem
(x : ℕ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊
theorem closedBall_eq_Icc (x : ℕ) (r : ℝ) : closedBall x r = Icc ⌈↑x - r⌉₊ ⌊↑x + r⌋₊ := by
rcases le_or_lt 0 r with (hr | hr)
· rw [← preimage_closedBall, Real.closedBall_eq_Icc, preimage_Icc]
exact add_nonneg (cast_nonneg x) hr
· rw [closedBall_eq_empty.2 hr, Icc_eq_empty_of_lt]
calc ⌊(x : ℝ) + r⌋₊ ≤ ⌊(x : ℝ)⌋₊ := floor_mono <| by linarith
_ < ⌈↑x - r⌉₊ := by
rw [floor_natCast, Nat.lt_ceil]
linarith
Nat.instProperSpace
instance
: ProperSpace ℕ
Nat.instNoncompactSpace
instance
: NoncompactSpace ℕ
instance : NoncompactSpace ℕ :=
noncompactSpace_of_neBot <| by simp [Filter.atTop_neBot]