Skip to content

Commit a6cd6ed

Browse files
feat (TopCat.Sphere) : add the open ball, instances
1 parent 4f7d34e commit a6cd6ed

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

Mathlib/Topology/Category/TopCat/Sphere.lean

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@ Authors: Jiazhen Xia, Elliot Dean Young
55
-/
66

77
import Mathlib.Analysis.InnerProductSpace.PiL2
8-
import Mathlib.Topology.Category.TopCat.Basic
8+
import Mathlib.Topology.Category.TopCat.EpiMono
99

1010
/-!
1111
# Euclidean spheres
1212
13-
This files defines the `n`-sphere `𝕊 n`, the `n`-disk `𝔻 n` and its
14-
boundary `∂𝔻 n` as objects in `TopCat`.
13+
This files defines the `n`-sphere `𝕊 n`, the `n`-disk `𝔻 n`, its boundary `∂𝔻 n` and its interior
14+
`𝔹 n` as objects in `TopCat`.
1515
1616
-/
1717

1818
universe u
1919

2020
namespace TopCat
21+
open CategoryTheory
2122

2223
/-- The `n`-disk is the set of points in ℝⁿ whose norm is at most `1`,
2324
endowed with the subspace topology. -/
@@ -33,6 +34,11 @@ endowed with the subspace topology. -/
3334
noncomputable def sphere (n : ℕ) : TopCat.{u} :=
3435
diskBoundary (n + 1)
3536

37+
/-- The `n`-ball is the set of points in ℝⁿ whose norm is strictly less than `1`,
38+
endowed with the subspace topology. -/
39+
noncomputable def ball (n : ℕ) : TopCat.{u} :=
40+
TopCat.of <| ULift <| Metric.ball (0 : EuclideanSpace ℝ (Fin n)) 1
41+
3642
/-- `𝔻 n` denotes the `n`-disk. -/
3743
scoped prefix:arg "𝔻 " => disk
3844

@@ -42,6 +48,9 @@ scoped prefix:arg "∂𝔻 " => diskBoundary
4248
/-- `𝕊 n` denotes the `n`-sphere. -/
4349
scoped prefix:arg "𝕊 " => sphere
4450

51+
/-- `𝔹 n` denotes the `n`-ball, the interior of the `n`-disk. -/
52+
scoped prefix:arg "𝔹 " => ball
53+
4554
/-- The inclusion `∂𝔻 n ⟶ 𝔻 n` of the boundary of the `n`-disk. -/
4655
def diskBoundaryInclusion (n : ℕ) : ∂𝔻 n ⟶ 𝔻 n :=
4756
ofHom
@@ -50,4 +59,32 @@ def diskBoundaryInclusion (n : ℕ) : ∂𝔻 n ⟶ 𝔻 n :=
5059
rw [isOpen_induced_iff, ← hst, ← hrs]
5160
tauto⟩ }
5261

62+
/-- The inclusion `𝔹 n ⟶ 𝔻 n` of the interior of the `n`-disk. -/
63+
def ballInclusion (n : ℕ) : 𝔹 n ⟶ 𝔻 n :=
64+
ofHom
65+
{ toFun := fun ⟨p, hp⟩ ↦ ⟨p, Metric.ball_subset_closedBall hp⟩
66+
continuous_toFun := ⟨fun t ⟨s, ⟨r, hro, hrs⟩, hst⟩ ↦ by
67+
rw [isOpen_induced_iff, ← hst, ← hrs]
68+
tauto⟩ }
69+
70+
instance {n : ℕ} : Mono (diskBoundaryInclusion n) := mono_iff_injective _ |>.mpr <| by
71+
intro ⟨x, hx⟩ ⟨y, hy⟩ h
72+
simp [diskBoundaryInclusion, disk] at h
73+
cases h; rfl
74+
75+
instance {n : ℕ} : Mono (ballInclusion n) := TopCat.mono_iff_injective _ |>.mpr <| by
76+
intro ⟨x, hx⟩ ⟨y, hy⟩ h
77+
simp [ballInclusion, disk] at h
78+
cases h; rfl
79+
80+
instance compact_disk (n : ℕ) : CompactSpace (𝔻 n) := by
81+
convert Homeomorph.compactSpace Homeomorph.ulift.symm
82+
rw [← isCompact_iff_compactSpace]
83+
fapply ProperSpace.isCompact_closedBall
84+
85+
instance compact_sphere (n : ℕ) : CompactSpace (∂𝔻 n) := by
86+
convert Homeomorph.compactSpace Homeomorph.ulift.symm
87+
rw [← isCompact_iff_compactSpace]
88+
fapply isCompact_sphere
89+
5390
end TopCat

0 commit comments

Comments
 (0)