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

Commit 4802490

Browse files
committed
chore(analysis/convex/exposed): downgrade imports (#18186)
Everything in this file was stated for ```lean [normed_linear_ordered_field 𝕜] ``` but would have worked for ```lean [topological_space 𝕜] [linear_ordered_ring 𝕜] [order_topology 𝕜] ``` and I have generalized even further where it was easy.
1 parent c0439b4 commit 4802490

File tree

1 file changed

+81
-44
lines changed

1 file changed

+81
-44
lines changed

src/analysis/convex/exposed.lean

Lines changed: 81 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Authors: Yaël Dillies, Bhavik Mehta
55
-/
66
import analysis.convex.extreme
77
import analysis.convex.function
8-
import analysis.normed.order.basic
8+
import topology.algebra.module.basic
9+
import topology.order.basic
910

1011
/-!
1112
# Exposed sets
@@ -45,15 +46,23 @@ More not-yet-PRed stuff is available on the branch `sperner_again`.
4546
open_locale classical affine big_operators
4647
open set
4748

48-
variables (𝕜 : Type*) {E : Type*} [normed_linear_ordered_field 𝕜] [add_comm_monoid E] [module 𝕜 E]
49-
[topological_space E] {l : E →L[𝕜] 𝕜} {A B C : set E} {X : finset E} {x : E}
49+
section preorder_semiring
50+
51+
variables (𝕜 : Type*) {E : Type*} [topological_space 𝕜] [semiring 𝕜] [preorder 𝕜]
52+
[add_comm_monoid E] [topological_space E] [module 𝕜 E] {A B : set E}
5053

5154
/-- A set `B` is exposed with respect to `A` iff it maximizes some functional over `A` (and contains
5255
all points maximizing it). Written `is_exposed 𝕜 A B`. -/
5356
def is_exposed (A B : set E) : Prop :=
5457
B.nonempty → ∃ l : E →L[𝕜] 𝕜, B = {x ∈ A | ∀ y ∈ A, l y ≤ l x}
5558

56-
variables {𝕜}
59+
end preorder_semiring
60+
61+
section ordered_ring
62+
63+
variables {𝕜 : Type*} {E : Type*} [topological_space 𝕜] [ordered_ring 𝕜]
64+
[add_comm_monoid E] [topological_space E] [module 𝕜 E]
65+
{l : E →L[𝕜] 𝕜} {A B C : set E} {X : finset E} {x : E}
5766

5867
/-- A useful way to build exposed sets from intersecting `A` with halfspaces (modelled by an
5968
inequality with a functional). -/
@@ -95,25 +104,36 @@ begin
95104
(λ x hx, ⟨hBA hx.1, λ y hy, (hw.2 y hy).trans (hx.2 w (hCB hw))⟩)⟩,
96105
end
97106

98-
/-- If `B` is an exposed subset of `A`, then `B` is the intersection of `A` with some closed
107+
/-- If `B` is a nonempty exposed subset of `A`, then `B` is the intersection of `A` with some closed
99108
halfspace. The converse is *not* true. It would require that the corresponding open halfspace
100109
doesn't intersect `A`. -/
101-
lemma eq_inter_halfspace (hAB : is_exposed 𝕜 A B) :
110+
lemma eq_inter_halfspace' {A B : set E} (hAB : is_exposed 𝕜 A B) (hB : B.nonempty) :
102111
∃ l : E →L[𝕜] 𝕜, ∃ a, B = {x ∈ A | a ≤ l x} :=
103112
begin
104-
obtain hB | hB := B.eq_empty_or_nonempty,
105-
{ refine ⟨0, 1, _⟩,
106-
rw [hB, eq_comm, eq_empty_iff_forall_not_mem],
107-
rintro x ⟨-, h⟩,
108-
rw continuous_linear_map.zero_apply at h,
109-
linarith },
110113
obtain ⟨l, rfl⟩ := hAB hB,
111114
obtain ⟨w, hw⟩ := hB,
112115
exact ⟨l, l w, subset.antisymm (λ x hx, ⟨hx.1, hx.2 w hw.1⟩)
113116
(λ x hx, ⟨hx.1, λ y hy, (hw.2 y hy).trans hx.2⟩)⟩,
114117
end
115118

116-
protected lemma inter (hB : is_exposed 𝕜 A B) (hC : is_exposed 𝕜 A C) :
119+
/-- For nontrivial `𝕜`, if `B` is an exposed subset of `A`, then `B` is the intersection of `A` with
120+
some closed halfspace. The converse is *not* true. It would require that the corresponding open
121+
halfspace doesn't intersect `A`. -/
122+
lemma eq_inter_halfspace [nontrivial 𝕜] {A B : set E} (hAB : is_exposed 𝕜 A B) :
123+
∃ l : E →L[𝕜] 𝕜, ∃ a, B = {x ∈ A | a ≤ l x} :=
124+
begin
125+
obtain rfl | hB := B.eq_empty_or_nonempty,
126+
{ refine ⟨0, 1, _⟩,
127+
rw [eq_comm, eq_empty_iff_forall_not_mem],
128+
rintro x ⟨-, h⟩,
129+
rw continuous_linear_map.zero_apply at h,
130+
have : ¬ ((1:𝕜) ≤ 0) := not_le_of_lt zero_lt_one,
131+
contradiction },
132+
exact hAB.eq_inter_halfspace' hB,
133+
end
134+
135+
protected lemma inter [has_continuous_add 𝕜] {A B C : set E} (hB : is_exposed 𝕜 A B)
136+
(hC : is_exposed 𝕜 A C) :
117137
is_exposed 𝕜 A (B ∩ C) :=
118138
begin
119139
rintro ⟨w, hwB, hwC⟩,
@@ -130,7 +150,7 @@ begin
130150
(hx w hwB.1)) }
131151
end
132152

133-
lemma sInter {F : finset (set E)} (hF : F.nonempty)
153+
lemma sInter [has_continuous_add 𝕜] {F : finset (set E)} (hF : F.nonempty)
134154
(hAF : ∀ B ∈ F, is_exposed 𝕜 A B) :
135155
is_exposed 𝕜 A (⋂₀ F) :=
136156
begin
@@ -164,41 +184,17 @@ begin
164184
exact hC.inter_left hCA,
165185
end
166186

167-
protected lemma is_extreme (hAB : is_exposed 𝕜 A B) :
168-
is_extreme 𝕜 A B :=
169-
begin
170-
refine ⟨hAB.subset, λ x₁ hx₁A x₂ hx₂A x hxB hx, _⟩,
171-
obtain ⟨l, rfl⟩ := hAB ⟨x, hxB⟩,
172-
have hl : convex_on 𝕜 univ l := l.to_linear_map.convex_on convex_univ,
173-
have hlx₁ := hxB.2 x₁ hx₁A,
174-
have hlx₂ := hxB.2 x₂ hx₂A,
175-
refine ⟨⟨hx₁A, λ y hy, _⟩, ⟨hx₂A, λ y hy, _⟩⟩,
176-
{ rw hlx₁.antisymm (hl.le_left_of_right_le (mem_univ _) (mem_univ _) hx hlx₂),
177-
exact hxB.2 y hy },
178-
{ rw hlx₂.antisymm (hl.le_right_of_left_le (mem_univ _) (mem_univ _) hx hlx₁),
179-
exact hxB.2 y hy }
180-
end
181-
182-
protected lemma convex (hAB : is_exposed 𝕜 A B) (hA : convex 𝕜 A) :
183-
convex 𝕜 B :=
187+
protected lemma is_closed [order_closed_topology 𝕜] {A B : set E}
188+
(hAB : is_exposed 𝕜 A B) (hA : is_closed A) : is_closed B :=
184189
begin
185190
obtain rfl | hB := B.eq_empty_or_nonempty,
186-
{ exact convex_empty },
187-
obtain ⟨l, rfl⟩ := hAB hB,
188-
exact λ x₁ hx₁ x₂ hx₂ a b ha hb hab, ⟨hA hx₁.1 hx₂.1 ha hb hab, λ y hy,
189-
((l.to_linear_map.concave_on convex_univ).convex_ge _
190-
⟨mem_univ _, hx₁.2 y hy⟩ ⟨mem_univ _, hx₂.2 y hy⟩ ha hb hab).2⟩,
191-
end
192-
193-
protected lemma is_closed [order_closed_topology 𝕜] (hAB : is_exposed 𝕜 A B) (hA : is_closed A) :
194-
is_closed B :=
195-
begin
196-
obtain ⟨l, a, rfl⟩ := hAB.eq_inter_halfspace,
191+
{ simp },
192+
obtain ⟨l, a, rfl⟩ := hAB.eq_inter_halfspace' hB,
197193
exact hA.is_closed_le continuous_on_const l.continuous.continuous_on,
198194
end
199195

200-
protected lemma is_compact [order_closed_topology 𝕜] [t2_space E] (hAB : is_exposed 𝕜 A B)
201-
(hA : is_compact A) : is_compact B :=
196+
protected lemma is_compact [order_closed_topology 𝕜] [t2_space E] {A B : set E}
197+
(hAB : is_exposed 𝕜 A B) (hA : is_compact A) : is_compact B :=
202198
is_compact_of_is_closed_subset hA (hAB.is_closed hA.is_closed) hAB.subset
203199

204200
end is_exposed
@@ -237,7 +233,48 @@ begin
237233
exact ⟨hl.1.1, l, λ y hy, ⟨hl.1.2 y hy, λ hxy, hl.2 y ⟨hy, λ z hz, (hl.1.2 z hz).trans hxy⟩⟩⟩,
238234
end
239235

236+
end ordered_ring
237+
238+
section linear_ordered_ring
239+
240+
variables {𝕜 : Type*} {E : Type*} [topological_space 𝕜] [linear_ordered_ring 𝕜]
241+
[add_comm_monoid E] [topological_space E] [module 𝕜 E]
242+
{A B C : set E}
243+
244+
namespace is_exposed
245+
246+
protected lemma convex (hAB : is_exposed 𝕜 A B) (hA : convex 𝕜 A) :
247+
convex 𝕜 B :=
248+
begin
249+
obtain rfl | hB := B.eq_empty_or_nonempty,
250+
{ exact convex_empty },
251+
obtain ⟨l, rfl⟩ := hAB hB,
252+
exact λ x₁ hx₁ x₂ hx₂ a b ha hb hab, ⟨hA hx₁.1 hx₂.1 ha hb hab, λ y hy,
253+
((l.to_linear_map.concave_on convex_univ).convex_ge _
254+
⟨mem_univ _, hx₁.2 y hy⟩ ⟨mem_univ _, hx₂.2 y hy⟩ ha hb hab).2⟩,
255+
end
256+
257+
protected lemma is_extreme (hAB : is_exposed 𝕜 A B) :
258+
is_extreme 𝕜 A B :=
259+
begin
260+
refine ⟨hAB.subset, λ x₁ hx₁A x₂ hx₂A x hxB hx, _⟩,
261+
obtain ⟨l, rfl⟩ := hAB ⟨x, hxB⟩,
262+
have hl : convex_on 𝕜 univ l := l.to_linear_map.convex_on convex_univ,
263+
have hlx₁ := hxB.2 x₁ hx₁A,
264+
have hlx₂ := hxB.2 x₂ hx₂A,
265+
refine ⟨⟨hx₁A, λ y hy, _⟩, ⟨hx₂A, λ y hy, _⟩⟩,
266+
{ have := @convex_on.le_left_of_right_le 𝕜 E 𝕜 _ _ _,
267+
rw hlx₁.antisymm (hl.le_left_of_right_le (mem_univ _) (mem_univ _) hx hlx₂),
268+
exact hxB.2 y hy },
269+
{ rw hlx₂.antisymm (hl.le_right_of_left_le (mem_univ _) (mem_univ _) hx hlx₁),
270+
exact hxB.2 y hy }
271+
end
272+
273+
end is_exposed
274+
240275
lemma exposed_points_subset_extreme_points :
241276
A.exposed_points 𝕜 ⊆ A.extreme_points 𝕜 :=
242277
λ x hx, mem_extreme_points_iff_extreme_singleton.2
243278
(mem_exposed_points_iff_exposed_singleton.1 hx).is_extreme
279+
280+
end linear_ordered_ring

0 commit comments

Comments
 (0)