Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit d70e26b

Browse files
committed
feat(analysis/convex/topology): improve some lemmas (#13136)
Replace some `s` with `closure s` in the LHS of `⊆` in some lemmas.
1 parent 208ebd4 commit d70e26b

File tree

4 files changed

+102
-32
lines changed

4 files changed

+102
-32
lines changed

src/analysis/calculus/fderiv_symmetric.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ begin
9898
rw [← smul_smul],
9999
apply s_conv.interior.add_smul_mem this _ ht,
100100
rw add_assoc at hw,
101-
convert s_conv.add_smul_mem_interior xs hw ⟨hpos, h_lt_1.le⟩ using 1,
102-
simp only [add_assoc, smul_add] },
101+
rw [add_assoc, ← smul_add],
102+
exact s_conv.add_smul_mem_interior xs hw ⟨hpos, h_lt_1.le⟩ },
103103
-- define a function `g` on `[0,1]` (identified with `[v, v + w]`) such that `g 1 - g 0` is the
104104
-- quantity to be estimated. We will check that its derivative is given by an explicit
105105
-- expression `g'`, that we can bound. Then the desired bound for `g 1 - g 0` follows from the

src/analysis/convex/integral.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ begin
256256
by_cases h0' : μ (to_measurable μ t)ᶜ = 0,
257257
{ rw ← ae_eq_univ at h0',
258258
rwa [restrict_congr_set h0', restrict_univ] at ht },
259-
exact hs.open_segment_subset_interior_left ht
259+
exact hs.open_segment_interior_self_subset_interior ht
260260
(hs.set_average_mem hsc h0' (measure_ne_top _ _) (ae_restrict_of_ae hfs) hfi.integrable_on)
261261
(average_mem_open_segment_compl_self (measurable_set_to_measurable μ t).null_measurable_set
262262
h0 h0' hfi)

src/analysis/convex/strict_convex_space.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ begin
9393
have hx' := hx, have hy' := hy,
9494
rw [← closure_closed_ball, closure_eq_interior_union_frontier,
9595
frontier_closed_ball (0 : E) one_ne_zero] at hx hy,
96-
cases hx, { exact (convex_closed_ball _ _).combo_mem_interior_left hx hy' ha hb.le hab },
97-
cases hy, { exact (convex_closed_ball _ _).combo_mem_interior_right hx' hy ha.le hb hab },
96+
cases hx, { exact (convex_closed_ball _ _).combo_interior_self_mem_interior hx hy' ha hb.le hab },
97+
cases hy, { exact (convex_closed_ball _ _).combo_self_interior_mem_interior hx' hy ha.le hb hab },
9898
rw [interior_closed_ball (0 : E) one_ne_zero, mem_ball_zero_iff],
9999
have hx₁ : ∥x∥ = 1, from mem_sphere_zero_iff_norm.1 hx,
100100
have hy₁ : ∥y∥ = 1, from mem_sphere_zero_iff_norm.1 hy,

src/analysis/convex/topology.lean

Lines changed: 97 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -80,58 +80,119 @@ section has_continuous_const_smul
8080
variables [add_comm_group E] [module ℝ E] [topological_space E]
8181
[topological_add_group E] [has_continuous_const_smul ℝ E]
8282

83-
lemma convex.combo_interior_self_subset_interior {s : set E} (hs : convex ℝ s) {a b : ℝ}
83+
/-- If `s` is a convex set, then `a • interior s + b • closure s ⊆ interior s` for all `0 < a`,
84+
`0 ≤ b`, `a + b = 1`. See also `convex.combo_interior_self_subset_interior` for a weaker version. -/
85+
lemma convex.combo_interior_closure_subset_interior {s : set E} (hs : convex ℝ s) {a b : ℝ}
8486
(ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
85-
a • interior s + b • s ⊆ interior s :=
87+
a • interior s + b • closure s ⊆ interior s :=
8688
interior_smul₀ ha.ne' s ▸
87-
calc interior (a • s) + b • s ⊆ interior (a • s + b • s) : subset_interior_add_left
89+
calc interior (a • s) + b • closure s ⊆ interior (a • s) + closure (b • s) :
90+
add_subset_add subset.rfl (smul_closure_subset b s)
91+
... = interior (a • s) + b • s : by rw is_open_interior.add_closure (b • s)
92+
... ⊆ interior (a • s + b • s) : subset_interior_add_left
8893
... ⊆ interior s : interior_mono $ hs.set_combo_subset ha.le hb hab
8994

95+
/-- If `s` is a convex set, then `a • interior s + b • s ⊆ interior s` for all `0 < a`, `0 ≤ b`,
96+
`a + b = 1`. See also `convex.combo_interior_closure_subset_interior` for a stronger version. -/
97+
lemma convex.combo_interior_self_subset_interior {s : set E} (hs : convex ℝ s) {a b : ℝ}
98+
(ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
99+
a • interior s + b • s ⊆ interior s :=
100+
calc a • interior s + b • s ⊆ a • interior s + b • closure s :
101+
add_subset_add subset.rfl $ image_subset _ subset_closure
102+
... ⊆ interior s : hs.combo_interior_closure_subset_interior ha hb hab
103+
104+
/-- If `s` is a convex set, then `a • closure s + b • interior s ⊆ interior s` for all `0 ≤ a`,
105+
`0 < b`, `a + b = 1`. See also `convex.combo_self_interior_subset_interior` for a weaker version. -/
106+
lemma convex.combo_closure_interior_subset_interior {s : set E} (hs : convex ℝ s) {a b : ℝ}
107+
(ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) :
108+
a • closure s + b • interior s ⊆ interior s :=
109+
by { rw add_comm, exact hs.combo_interior_closure_subset_interior hb ha (add_comm a b ▸ hab) }
110+
111+
/-- If `s` is a convex set, then `a • s + b • interior s ⊆ interior s` for all `0 ≤ a`, `0 < b`,
112+
`a + b = 1`. See also `convex.combo_closure_interior_subset_interior` for a stronger version. -/
90113
lemma convex.combo_self_interior_subset_interior {s : set E} (hs : convex ℝ s) {a b : ℝ}
91114
(ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) :
92115
a • s + b • interior s ⊆ interior s :=
93116
by { rw add_comm, exact hs.combo_interior_self_subset_interior hb ha (add_comm a b ▸ hab) }
94117

95-
lemma convex.combo_mem_interior_left {s : set E} (hs : convex ℝ s) {x y : E} (hx : x ∈ interior s)
96-
(hy : y ∈ s) {a b : ℝ} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
118+
lemma convex.combo_interior_closure_mem_interior {s : set E} (hs : convex ℝ s) {x y : E}
119+
(hx : x ∈ interior s) (hy : y ∈ closure s) {a b : ℝ} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
97120
a • x + b • y ∈ interior s :=
98-
hs.combo_interior_self_subset_interior ha hb hab $
121+
hs.combo_interior_closure_subset_interior ha hb hab $
99122
add_mem_add (smul_mem_smul_set hx) (smul_mem_smul_set hy)
100123

101-
lemma convex.combo_mem_interior_right {s : set E} (hs : convex ℝ s) {x y : E} (hx : x ∈ s)
102-
(hy : y ∈ interior s) {a b : ℝ} (ha : 0 a) (hb : 0 < b) (hab : a + b = 1) :
124+
lemma convex.combo_interior_self_mem_interior {s : set E} (hs : convex ℝ s) {x y : E}
125+
(hx : x ∈ interior s) (hy : y ∈ s) {a b : ℝ} (ha : 0 < a) (hb : 0 b) (hab : a + b = 1) :
103126
a • x + b • y ∈ interior s :=
104-
hs.combo_self_interior_subset_interior ha hb hab $
127+
hs.combo_interior_closure_mem_interior hx (subset_closure hy) ha hb hab
128+
129+
lemma convex.combo_closure_interior_mem_interior {s : set E} (hs : convex ℝ s) {x y : E}
130+
(hx : x ∈ closure s) (hy : y ∈ interior s) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) :
131+
a • x + b • y ∈ interior s :=
132+
hs.combo_closure_interior_subset_interior ha hb hab $
105133
add_mem_add (smul_mem_smul_set hx) (smul_mem_smul_set hy)
106134

107-
lemma convex.open_segment_subset_interior_left {s : set E} (hs : convex ℝ s) {x y : E}
135+
lemma convex.combo_self_interior_mem_interior {s : set E} (hs : convex ℝ s) {x y : E}
136+
(hx : x ∈ s) (hy : y ∈ interior s) {a b : ℝ} (ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) :
137+
a • x + b • y ∈ interior s :=
138+
hs.combo_closure_interior_mem_interior (subset_closure hx) hy ha hb hab
139+
140+
lemma convex.open_segment_interior_closure_subset_interior {s : set E} (hs : convex ℝ s) {x y : E}
141+
(hx : x ∈ interior s) (hy : y ∈ closure s) : open_segment ℝ x y ⊆ interior s :=
142+
begin
143+
rintro _ ⟨a, b, ha, hb, hab, rfl⟩,
144+
exact hs.combo_interior_closure_mem_interior hx hy ha hb.le hab
145+
end
146+
147+
lemma convex.open_segment_interior_self_subset_interior {s : set E} (hs : convex ℝ s) {x y : E}
108148
(hx : x ∈ interior s) (hy : y ∈ s) : open_segment ℝ x y ⊆ interior s :=
109-
by { rintro _ ⟨a, b, ha, hb, hab, rfl⟩, exact hs.combo_mem_interior_left hx hy ha hb.le hab }
149+
hs.open_segment_interior_closure_subset_interior hx (subset_closure hy)
110150

111-
lemma convex.open_segment_subset_interior_right {s : set E} (hs : convex ℝ s) {x y : E}
151+
lemma convex.open_segment_closure_interior_subset_interior {s : set E} (hs : convex ℝ s) {x y : E}
152+
(hx : x ∈ closure s) (hy : y ∈ interior s) : open_segment ℝ x y ⊆ interior s :=
153+
begin
154+
rintro _ ⟨a, b, ha, hb, hab, rfl⟩,
155+
exact hs.combo_closure_interior_mem_interior hx hy ha.le hb hab
156+
end
157+
158+
lemma convex.open_segment_self_interior_subset_interior {s : set E} (hs : convex ℝ s) {x y : E}
112159
(hx : x ∈ s) (hy : y ∈ interior s) : open_segment ℝ x y ⊆ interior s :=
113-
by { rintro _ ⟨a, b, ha, hb, hab, rfl⟩, exact hs.combo_mem_interior_right hx hy ha.le hb hab }
160+
hs.open_segment_closure_interior_subset_interior (subset_closure hx) hy
161+
162+
/-- If `x ∈ closure s` and `y ∈ interior s`, then the segment `(x, y]` is included in `interior s`.
163+
-/
164+
lemma convex.add_smul_sub_mem_interior' {s : set E} (hs : convex ℝ s)
165+
{x y : E} (hx : x ∈ closure s) (hy : y ∈ interior s) {t : ℝ} (ht : t ∈ Ioc (0 : ℝ) 1) :
166+
x + t • (y - x) ∈ interior s :=
167+
by simpa only [sub_smul, smul_sub, one_smul, add_sub, add_comm]
168+
using hs.combo_interior_closure_mem_interior hy hx ht.1 (sub_nonneg.mpr ht.2)
169+
(add_sub_cancel'_right _ _)
114170

115171
/-- If `x ∈ s` and `y ∈ interior s`, then the segment `(x, y]` is included in `interior s`. -/
116172
lemma convex.add_smul_sub_mem_interior {s : set E} (hs : convex ℝ s)
117173
{x y : E} (hx : x ∈ s) (hy : y ∈ interior s) {t : ℝ} (ht : t ∈ Ioc (0 : ℝ) 1) :
118174
x + t • (y - x) ∈ interior s :=
119-
by simpa only [sub_smul, smul_sub, one_smul, add_sub, add_comm]
120-
using hs.combo_mem_interior_left hy hx ht.1 (sub_nonneg.mpr ht.2) (add_sub_cancel'_right _ _)
175+
hs.add_smul_sub_mem_interior' (subset_closure hx) hy ht
176+
177+
/-- If `x ∈ closure s` and `x + y ∈ interior s`, then `x + t y ∈ interior s` for `t ∈ (0, 1]`. -/
178+
lemma convex.add_smul_mem_interior' {s : set E} (hs : convex ℝ s)
179+
{x y : E} (hx : x ∈ closure s) (hy : x + y ∈ interior s) {t : ℝ} (ht : t ∈ Ioc (0 : ℝ) 1) :
180+
x + t • y ∈ interior s :=
181+
by simpa only [add_sub_cancel'] using hs.add_smul_sub_mem_interior' hx hy ht
121182

122183
/-- If `x ∈ s` and `x + y ∈ interior s`, then `x + t y ∈ interior s` for `t ∈ (0, 1]`. -/
123184
lemma convex.add_smul_mem_interior {s : set E} (hs : convex ℝ s)
124185
{x y : E} (hx : x ∈ s) (hy : x + y ∈ interior s) {t : ℝ} (ht : t ∈ Ioc (0 : ℝ) 1) :
125186
x + t • y ∈ interior s :=
126-
by { convert hs.add_smul_sub_mem_interior hx hy ht, abel }
187+
hs.add_smul_mem_interior' (subset_closure hx) hy ht
127188

128189
/-- In a topological vector space, the interior of a convex set is convex. -/
129-
lemma convex.interior {s : set E} (hs : convex ℝ s) : convex ℝ (interior s) :=
190+
protected lemma convex.interior {s : set E} (hs : convex ℝ s) : convex ℝ (interior s) :=
130191
convex_iff_open_segment_subset.mpr $ λ x y hx hy,
131-
hs.open_segment_subset_interior_left hx (interior_subset hy)
192+
hs.open_segment_closure_interior_subset_interior (interior_subset_closure hx) hy
132193

133194
/-- In a topological vector space, the closure of a convex set is convex. -/
134-
lemma convex.closure {s : set E} (hs : convex ℝ s) : convex ℝ (closure s) :=
195+
protected lemma convex.closure {s : set E} (hs : convex ℝ s) : convex ℝ (closure s) :=
135196
λ x y hx hy a b ha hb hab,
136197
let f : E → E → E := λ x' y', a • x' + b • y' in
137198
have hf : continuous (λ p : E × E, f p.1 p.2), from
@@ -165,17 +226,17 @@ hs.compact_convex_hull.is_closed
165226
open affine_map
166227

167228
/-- If we dilate a convex set about a point in its interior by a scale `t > 1`, the interior of
168-
the result contains the original set.
229+
the result contains the closure of the original set.
169230
170231
TODO Generalise this from convex sets to sets that are balanced / star-shaped about `x`. -/
171-
lemma convex.subset_interior_image_homothety_of_one_lt
172-
{s : set E} (hs : convex ℝ s) {x : E} (hx : x ∈ interior s) (t : ℝ) (ht : 1 < t) :
173-
s ⊆ interior (image (homothety x t) s) :=
232+
lemma convex.closure_subset_interior_image_homothety_of_one_lt {s : set E} (hs : convex ℝ s)
233+
{x : E} (hx : x ∈ interior s) (t : ℝ) (ht : 1 < t) :
234+
closure s ⊆ interior (homothety x t '' s) :=
174235
begin
175236
intros y hy,
176237
let I := { z | ∃ (u : ℝ), u ∈ Ioc (0 : ℝ) 1 ∧ z = y + u • (x - y) },
177238
have hI : I ⊆ interior s,
178-
{ rintros z ⟨u, hu, rfl⟩, exact hs.add_smul_sub_mem_interior hy hx hu, },
239+
{ rintros z ⟨u, hu, rfl⟩, exact hs.add_smul_sub_mem_interior' hy hx hu, },
179240
let z := homothety x t⁻¹ y,
180241
have hz₁ : z ∈ interior s,
181242
{ suffices : z ∈ I, { exact hI this, },
@@ -190,13 +251,22 @@ begin
190251
rw hz₂,
191252
rw mem_interior at hz₁ ⊢,
192253
obtain ⟨U, hU₁, hU₂, hU₃⟩ := hz₁,
193-
exact ⟨image (homothety x t) U,
254+
exact ⟨homothety x t '' U,
194255
image_subset ⇑(homothety x t) hU₁,
195256
homothety_is_open_map x t ht' U hU₂,
196257
mem_image_of_mem ⇑(homothety x t) hU₃⟩,
197258
end
198259

199-
lemma convex.is_path_connected {s : set E} (hconv : convex ℝ s) (hne : s.nonempty) :
260+
/-- If we dilate a convex set about a point in its interior by a scale `t > 1`, the interior of
261+
the result contains the closure of the original set.
262+
263+
TODO Generalise this from convex sets to sets that are balanced / star-shaped about `x`. -/
264+
lemma convex.subset_interior_image_homothety_of_one_lt {s : set E} (hs : convex ℝ s)
265+
{x : E} (hx : x ∈ interior s) (t : ℝ) (ht : 1 < t) :
266+
s ⊆ interior (homothety x t '' s) :=
267+
subset_closure.trans $ hs.closure_subset_interior_image_homothety_of_one_lt hx t ht
268+
269+
protected lemma convex.is_path_connected {s : set E} (hconv : convex ℝ s) (hne : s.nonempty) :
200270
is_path_connected s :=
201271
begin
202272
refine is_path_connected_iff.mpr ⟨hne, _⟩,
@@ -212,7 +282,7 @@ Every topological vector space over ℝ is path connected.
212282
213283
Not an instance, because it creates enormous TC subproblems (turn on `pp.all`).
214284
-/
215-
lemma topological_add_group.path_connected : path_connected_space E :=
285+
protected lemma topological_add_group.path_connected : path_connected_space E :=
216286
path_connected_space_iff_univ.mpr $ convex_univ.is_path_connected ⟨(0 : E), trivial⟩
217287

218288
end has_continuous_smul

0 commit comments

Comments
 (0)