Skip to content

Commit 963cde7

Browse files
authored
Merge branch 'master' into markov
2 parents 96c86e8 + 534cf0b commit 963cde7

2 files changed

Lines changed: 66 additions & 24 deletions

File tree

Mathlib/Analysis/Normed/Module/Connected.lean

Lines changed: 55 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ public section
3131
assert_not_exists Subgroup.index Nat.divisors
3232
-- TODO assert_not_exists Cardinal
3333

34-
open Convex Set Metric
34+
open Set Metric
35+
open scoped Convex ENNReal
3536

3637
section TopologicalVectorSpace
3738

@@ -135,39 +136,70 @@ section Ball
135136

136137
namespace Metric
137138

138-
theorem ball_contractible {x : E} {r : ℝ} (hr : 0 < r) :
139+
theorem contractibleSpace_ball {x : E} {r : ℝ} (hr : 0 < r) :
139140
ContractibleSpace (ball x r) :=
140-
Convex.contractibleSpace (convex_ball _ _) (by simpa)
141-
142-
theorem eball_contractible {x : E} {r : ENNReal} (hr : 0 < r) :
143-
ContractibleSpace (Metric.eball x r) := by
144-
cases r with
145-
| top =>
146-
rw [eball_top_eq_univ, (Homeomorph.Set.univ E).contractibleSpace_iff]
147-
exact RealTopologicalVectorSpace.contractibleSpace
148-
| coe r =>
149-
rw [Metric.eball_coe]
150-
apply ball_contractible
151-
simpa using hr
141+
(convex_ball _ _).contractibleSpace (by simpa)
142+
143+
@[deprecated (since := "2026-02-02")]
144+
alias ball_contractible := contractibleSpace_ball
145+
146+
theorem contractibleSpace_eball {x : E} {r : ℝ≥0∞} (hr : 0 < r) :
147+
ContractibleSpace (eball x r) :=
148+
(convex_eball _ _).contractibleSpace ⟨x, by simpa⟩
149+
150+
@[deprecated (since := "2026-02-02")]
151+
alias eball_contractible := contractibleSpace_eball
152+
153+
theorem contractibleSpace_closedBall {x : E} {r : ℝ} (hr : 0 ≤ r) :
154+
ContractibleSpace (closedBall x r) :=
155+
(convex_closedBall _ _).contractibleSpace (by simpa)
156+
157+
instance contractibleSpace_closedEBall {x : E} {r : ℝ≥0∞} :
158+
ContractibleSpace (closedEBall x r) :=
159+
(convex_closedEBall _ _).contractibleSpace ⟨x, by simp⟩
152160

153161
theorem isPathConnected_ball {x : E} {r : ℝ} (hr : 0 < r) :
154-
IsPathConnected (ball x r) := by
155-
rw [isPathConnected_iff_pathConnectedSpace]
156-
exact @ContractibleSpace.instPathConnectedSpace _ _ (ball_contractible hr)
162+
IsPathConnected (ball x r) :=
163+
convex_ball _ _ |>.isPathConnected <| by simpa
164+
165+
theorem isPathConnected_eball {x : E} {r : ℝ≥0∞} (hr : 0 < r) :
166+
IsPathConnected (eball x r) :=
167+
convex_eball _ _ |>.isPathConnected ⟨x, by simpa⟩
168+
169+
theorem isPathConnected_closedBall {x : E} {r : ℝ} (hr : 0 ≤ r) :
170+
IsPathConnected (closedBall x r) :=
171+
convex_closedBall _ _ |>.isPathConnected ⟨x, by simpa⟩
157172

158-
theorem isPathConnected_eball {x : E} {r : ENNReal} (hr : 0 < r) :
159-
IsPathConnected (Metric.eball x r) := by
160-
rw [isPathConnected_iff_pathConnectedSpace]
161-
exact @ContractibleSpace.instPathConnectedSpace _ _ (eball_contractible hr)
173+
theorem isPathConnected_closedEBall {x : E} {r : ℝ≥0∞} :
174+
IsPathConnected (closedEBall x r) :=
175+
isPathConnected_iff_pathConnectedSpace.mpr inferInstance
176+
177+
theorem isPreconnected_ball {x : E} {r : ℝ} : IsPreconnected (ball x r) :=
178+
(convex_ball _ _).isPreconnected
179+
180+
theorem isPreconnected_eball {x : E} {r : ℝ≥0∞} : IsPreconnected (eball x r) :=
181+
(convex_eball _ _).isPreconnected
182+
183+
theorem isPreconnected_closedBall {x : E} {r : ℝ} : IsPreconnected (closedBall x r) :=
184+
(convex_closedBall _ _).isPreconnected
185+
186+
theorem isPreconnected_closedEBall {x : E} {r : ℝ≥0∞} : IsPreconnected (closedEBall x r) :=
187+
(convex_closedEBall _ _).isPreconnected
162188

163189
theorem isConnected_ball {x : E} {r : ℝ} (hr : 0 < r) :
164190
IsConnected (ball x r) :=
165191
(isPathConnected_ball hr).isConnected
166192

167-
theorem isConnected_eball {x : E} {r : ENNReal} (hr : 0 < r) :
168-
IsConnected (Metric.eball x r) :=
193+
theorem isConnected_eball {x : E} {r : ℝ≥0} (hr : 0 < r) :
194+
IsConnected (eball x r) :=
169195
(isPathConnected_eball hr).isConnected
170196

197+
theorem isConnected_closedBall {x : E} {r : ℝ} (hr : 0 ≤ r) : IsConnected (closedBall x r) :=
198+
⟨⟨x, by simpa⟩, isPreconnected_closedBall⟩
199+
200+
theorem isConnected_closedEBall {x : E} {r : ℝ≥0∞} : IsConnected (closedEBall x r) :=
201+
⟨⟨x, mem_closedEBall_self⟩, isPreconnected_closedEBall⟩
202+
171203
end Metric
172204

173205
end Ball

Mathlib/Analysis/Normed/Module/Convex.lean

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,22 @@ theorem convexOn_dist (z : E) (hs : Convex ℝ s) : ConvexOn ℝ s fun z' => dis
6060
theorem convexOn_univ_dist (z : E) : ConvexOn ℝ univ fun z' => dist z' z :=
6161
convexOn_dist z convex_univ
6262

63-
theorem convex_ball (a : E) (r : ℝ) : Convex ℝ (Metric.ball a r) := by
63+
theorem convex_ball (a : E) (r : ℝ) : Convex ℝ (ball a r) := by
6464
simpa only [Metric.ball, sep_univ] using (convexOn_univ_dist a).convex_lt r
6565

66+
theorem convex_eball (a : E) (r : ENNReal) : Convex ℝ (eball a r) := by
67+
cases r with
68+
| top => simp [convex_univ]
69+
| coe r => simp [eball_coe, convex_ball]
70+
6671
theorem convex_closedBall (a : E) (r : ℝ) : Convex ℝ (Metric.closedBall a r) := by
6772
simpa only [Metric.closedBall, sep_univ] using (convexOn_univ_dist a).convex_le r
6873

74+
theorem convex_closedEBall (a : E) (r : ENNReal) : Convex ℝ (closedEBall a r) := by
75+
cases r with
76+
| top => simp [convex_univ]
77+
| coe r => simp [closedEBall_coe, convex_closedBall]
78+
6979
open Pointwise in
7080
theorem convexHull_sphere_eq_closedBall {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
7181
[Nontrivial F] (x : F) {r : ℝ} (hr : 0 ≤ r) :

0 commit comments

Comments
 (0)