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

Commit c577340

Browse files
feat(analysis/convex/extreme): Extreme points of s ×ˢ t (#18171)
Characterise `segment`, `open_segment`, `extreme_points` in `prod` and `pi`. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
1 parent e876965 commit c577340

2 files changed

Lines changed: 171 additions & 37 deletions

File tree

src/analysis/convex/extreme.lean

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@ See chapter 8 of [Barry Simon, *Convexity*][simon2011]
3535
3636
## TODO
3737
38-
Define intrinsic frontier and prove lemmas related to extreme sets and points.
38+
Prove lemmas relating extreme sets and points to the intrinsic frontier.
3939
4040
More not-yet-PRed stuff is available on the branch `sperner_again`.
4141
-/
4242

43-
open_locale classical affine
44-
open set
43+
open function set
44+
open_locale affine classical
4545

46-
variables (𝕜 : Type*) {E : Type*}
46+
variables {𝕜 E F ι : Type*} {π : ι → Type*}
4747

4848
section has_smul
49-
variables [ordered_semiring 𝕜] [add_comm_monoid E] [has_smul 𝕜 E]
49+
variables (𝕜) [ordered_semiring 𝕜] [add_comm_monoid E] [has_smul 𝕜 E]
5050

5151
/-- A set `B` is an extreme subset of `A` if `B ⊆ A` and all points of `B` only belong to open
5252
segments whose ends are in `B`. -/
@@ -99,7 +99,7 @@ protected lemma is_extreme.mono (hAC : is_extreme 𝕜 A C) (hBA : B ⊆ A) (hCB
9999
is_extreme 𝕜 B C :=
100100
⟨hCB, λ x₁ hx₁B x₂ hx₂B x hxC hx, hAC.2 (hBA hx₁B) (hBA hx₂B) hxC hx⟩
101101

102-
lemma is_extreme_Inter {ι : Type*} [nonempty ι] {F : ι → set E}
102+
lemma is_extreme_Inter {ι : Sort*} [nonempty ι] {F : ι → set E}
103103
(hAF : ∀ i : ι, is_extreme 𝕜 A (F i)) :
104104
is_extreme 𝕜 A (⋂ i : ι, F i) :=
105105
begin
@@ -110,16 +110,9 @@ begin
110110
exact ⟨λ i, (h i).1, λ i, (h i).2⟩,
111111
end
112112

113-
lemma is_extreme_bInter {F : set (set E)} (hF : F.nonempty)
114-
(hAF : ∀ B ∈ F, is_extreme 𝕜 A B) :
113+
lemma is_extreme_bInter {F : set (set E)} (hF : F.nonempty) (hA : ∀ B ∈ F, is_extreme 𝕜 A B) :
115114
is_extreme 𝕜 A (⋂ B ∈ F, B) :=
116-
begin
117-
obtain ⟨B, hB⟩ := hF,
118-
refine ⟨(bInter_subset_of_mem hB).trans (hAF B hB).1, λ x₁ hx₁A x₂ hx₂A x hxF hx, _⟩,
119-
simp_rw mem_Inter₂ at ⊢ hxF,
120-
have h := λ B hB, (hAF B hB).2 hx₁A hx₂A (hxF B hB) hx,
121-
exact ⟨λ B hB, (h B hB).1, λ B hB, (h B hB).2⟩,
122-
end
115+
by { haveI := hF.to_subtype, simpa only [Inter_subtype] using is_extreme_Inter (λ i : F, hA _ i.2) }
123116

124117
lemma is_extreme_sInter {F : set (set E)} (hF : F.nonempty)
125118
(hAF : ∀ B ∈ F, is_extreme 𝕜 A B) :
@@ -132,7 +125,7 @@ begin
132125
exact ⟨λ B hB, (h B hB).1, λ B hB, (h B hB).2⟩,
133126
end
134127

135-
lemma extreme_points_def :
128+
lemma mem_extreme_points :
136129
x ∈ A.extreme_points 𝕜 ↔ x ∈ A ∧ ∀ (x₁ x₂ ∈ A), x ∈ open_segment 𝕜 x₁ x₂ → x₁ = x ∧ x₂ = x :=
137130
iff.rfl
138131

@@ -175,13 +168,59 @@ subset.antisymm (λ x hx, ⟨hx.1, hAB.extreme_points_subset_extreme_points hx
175168
end has_smul
176169

177170
section ordered_semiring
178-
variables {𝕜} [ordered_semiring 𝕜] [add_comm_group E] [module 𝕜 E] {A B : set E} {x : E}
171+
variables [ordered_semiring 𝕜] [add_comm_group E] [add_comm_group F] [Π i, add_comm_group (π i)]
172+
[module 𝕜 E] [module 𝕜 F] [Π i, module 𝕜 (π i)] {A B : set E} {x : E}
179173

180174
lemma is_extreme.convex_diff (hA : convex 𝕜 A) (hAB : is_extreme 𝕜 A B) :
181175
convex 𝕜 (A \ B) :=
182176
convex_iff_open_segment_subset.2 (λ x₁ ⟨hx₁A, hx₁B⟩ x₂ ⟨hx₂A, hx₂B⟩ x hx,
183177
⟨hA.open_segment_subset hx₁A hx₂A hx, λ hxB, hx₁B (hAB.2 hx₁A hx₂A hxB hx).1⟩)
184178

179+
@[simp] lemma extreme_points_prod (s : set E) (t : set F) :
180+
(s ×ˢ t).extreme_points 𝕜 = s.extreme_points 𝕜 ×ˢ t.extreme_points 𝕜 :=
181+
begin
182+
ext,
183+
refine (and_congr_right $ λ hx, ⟨λ h, _, λ h, _⟩).trans (and_and_and_comm _ _ _ _),
184+
split,
185+
{ rintro x₁ hx₁ x₂ hx₂ hx_fst,
186+
refine (h (mk_mem_prod hx₁ hx.2) (mk_mem_prod hx₂ hx.2) _).imp
187+
(congr_arg prod.fst) (congr_arg prod.fst),
188+
rw ←prod.image_mk_open_segment_left,
189+
exact ⟨_, hx_fst, prod.mk.eta⟩ },
190+
{ rintro x₁ hx₁ x₂ hx₂ hx_snd,
191+
refine (h (mk_mem_prod hx.1 hx₁) (mk_mem_prod hx.1 hx₂) _).imp
192+
(congr_arg prod.snd) (congr_arg prod.snd),
193+
rw ←prod.image_mk_open_segment_right,
194+
exact ⟨_, hx_snd, prod.mk.eta⟩ },
195+
{ rintro x₁ hx₁ x₂ hx₂ ⟨a, b, ha, hb, hab, hx'⟩,
196+
simp_rw prod.ext_iff,
197+
exact (and_and_and_comm _ _ _ _).1
198+
⟨h.1 hx₁.1 hx₂.1 ⟨a, b, ha, hb, hab, congr_arg prod.fst hx'⟩,
199+
h.2 hx₁.2 hx₂.2 ⟨a, b, ha, hb, hab, congr_arg prod.snd hx'⟩⟩ }
200+
end
201+
202+
@[simp] lemma extreme_points_pi (s : Π i, set (π i)) :
203+
(univ.pi s).extreme_points 𝕜 = univ.pi (λ i, (s i).extreme_points 𝕜) :=
204+
begin
205+
ext,
206+
simp only [mem_extreme_points, mem_pi, mem_univ, true_implies_iff, @forall_and_distrib ι],
207+
refine and_congr_right (λ hx, ⟨λ h i, _, λ h, _⟩),
208+
{ rintro x₁ hx₁ x₂ hx₂ hi,
209+
refine (h (update x i x₁) _ (update x i x₂) _ _).imp (λ h₁, by rw [←h₁, update_same])
210+
(λ h₂, by rw [←h₂, update_same]),
211+
iterate 2
212+
{ rintro j,
213+
obtain rfl | hji := eq_or_ne j i,
214+
{ rwa update_same },
215+
{ rw update_noteq hji,
216+
exact hx _ } },
217+
rw ←pi.image_update_open_segment,
218+
exact ⟨_, hi, update_eq_self _ _⟩ },
219+
{ rintro x₁ hx₁ x₂ hx₂ ⟨a, b, ha, hb, hab, hx'⟩,
220+
simp_rw [funext_iff, ←forall_and_distrib],
221+
exact λ i, h _ _ (hx₁ _) _ (hx₂ _) ⟨a, b, ha, hb, hab, congr_fun hx' _⟩ }
222+
end
223+
185224
end ordered_semiring
186225

187226
section linear_ordered_ring

src/analysis/convex/segment.lean

Lines changed: 115 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/-
22
Copyright (c) 2019 Alexander Bentkamp. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
4-
Authors: Alexander Bentkamp, Yury Kudriashov, Yaël Dillies
4+
Authors: Alexander Bentkamp, Yury Kudryashov, Yaël Dillies
55
-/
66
import algebra.order.invertible
77
import algebra.order.smul
@@ -29,9 +29,10 @@ Should we rename `segment` and `open_segment` to `convex.Icc` and `convex.Ioo`?
2929
define `clopen_segment`/`convex.Ico`/`convex.Ioc`?
3030
-/
3131

32-
variables {𝕜 E F : Type*}
32+
variables {𝕜 E F G ι : Type*} {π : ι → Type*}
3333

34-
open set
34+
open function set
35+
open_locale pointwise
3536

3637
section ordered_semiring
3738
variables [ordered_semiring 𝕜] [add_comm_monoid E]
@@ -137,7 +138,8 @@ end ordered_semiring
137138
open_locale convex
138139

139140
section ordered_ring
140-
variables (𝕜) [ordered_ring 𝕜] [add_comm_group E] [add_comm_group F] [module 𝕜 E] [module 𝕜 F]
141+
variables (𝕜) [ordered_ring 𝕜] [add_comm_group E] [add_comm_group F] [add_comm_group G] [module 𝕜 E]
142+
[module 𝕜 F]
141143

142144
section densely_ordered
143145
variables [nontrivial 𝕜] [densely_ordered 𝕜]
@@ -180,28 +182,29 @@ lemma open_segment_eq_image_line_map (x y : E) :
180182
open_segment 𝕜 x y = affine_map.line_map x y '' Ioo (0 : 𝕜) 1 :=
181183
by { convert open_segment_eq_image 𝕜 x y, ext, exact affine_map.line_map_apply_module _ _ _ }
182184

183-
lemma segment_image (f : E →ₗ[𝕜] F) (a b : E) : f '' [a -[𝕜] b] = [f a -[𝕜] f b] :=
184-
set.ext (λ x, by simp_rw [segment_eq_image, mem_image, exists_exists_and_eq_and, map_add, map_smul])
185+
@[simp] lemma image_segment (f : E →ᵃ[𝕜] F) (a b : E) : f '' [a -[𝕜] b] = [f a -[𝕜] f b] :=
186+
set.ext $ λ x, by simp_rw [segment_eq_image_line_map, mem_image, exists_exists_and_eq_and,
187+
affine_map.apply_line_map]
185188

186-
@[simp] lemma open_segment_image (f : E →[𝕜] F) (a b : E) :
189+
@[simp] lemma image_open_segment (f : E →[𝕜] F) (a b : E) :
187190
f '' open_segment 𝕜 a b = open_segment 𝕜 (f a) (f b) :=
188-
set.ext (λ x, by simp_rw [open_segment_eq_image, mem_image, exists_exists_and_eq_and, map_add,
189-
map_smul])
191+
set.ext $ λ x, by simp_rw [open_segment_eq_image_line_map, mem_image, exists_exists_and_eq_and,
192+
affine_map.apply_line_map]
190193

191-
lemma mem_segment_translate (a : E) {x b c} : a + x ∈ [a + b -[𝕜] a + c] ↔ x ∈ [b -[𝕜] c] :=
192-
begin
193-
rw [segment_eq_image', segment_eq_image'],
194-
refine exists_congr (λ θ, and_congr iff.rfl _),
195-
simp only [add_sub_add_left_eq_sub, add_assoc, add_right_inj],
196-
end
194+
@[simp] lemma vadd_segment [add_torsor G E] [vadd_comm_class G E E] (a : G) (b c : E) :
195+
a +ᵥ [b -[𝕜] c] = [a +ᵥ b -[𝕜] a +ᵥ c] :=
196+
image_segment 𝕜 ⟨_, linear_map.id, λ _ _, vadd_comm _ _ _⟩ b c
197+
198+
@[simp] lemma vadd_open_segment [add_torsor G E] [vadd_comm_class G E E] (a : G) (b c : E) :
199+
a +ᵥ open_segment 𝕜 b c = open_segment 𝕜 (a +ᵥ b) (a +ᵥ c) :=
200+
image_open_segment 𝕜 ⟨_, linear_map.id, λ _ _, vadd_comm _ _ _⟩ b c
201+
202+
@[simp] lemma mem_segment_translate (a : E) {x b c} : a + x ∈ [a + b -[𝕜] a + c] ↔ x ∈ [b -[𝕜] c] :=
203+
by simp_rw [←vadd_eq_add, ←vadd_segment, vadd_mem_vadd_set_iff]
197204

198205
@[simp] lemma mem_open_segment_translate (a : E) {x b c : E} :
199206
a + x ∈ open_segment 𝕜 (a + b) (a + c) ↔ x ∈ open_segment 𝕜 b c :=
200-
begin
201-
rw [open_segment_eq_image', open_segment_eq_image'],
202-
refine exists_congr (λ θ, and_congr iff.rfl _),
203-
simp only [add_sub_add_left_eq_sub, add_assoc, add_right_inj],
204-
end
207+
by simp_rw [←vadd_eq_add, ←vadd_open_segment, vadd_mem_vadd_set_iff]
205208

206209
lemma segment_translate_preimage (a b c : E) : (λ x, a + x) ⁻¹' [a + b -[𝕜] a + c] = [b -[𝕜] c] :=
207210
set.ext $ λ x, mem_segment_translate 𝕜 a
@@ -492,3 +495,95 @@ begin
492495
end
493496

494497
end linear_ordered_field
498+
499+
namespace prod
500+
variables [ordered_semiring 𝕜] [add_comm_monoid E] [add_comm_monoid F] [module 𝕜 E] [module 𝕜 F]
501+
502+
lemma segment_subset (x y : E × F) : segment 𝕜 x y ⊆ segment 𝕜 x.1 y.1 ×ˢ segment 𝕜 x.2 y.2 :=
503+
begin
504+
rintro z ⟨a, b, ha, hb, hab, hz⟩,
505+
exact ⟨⟨a, b, ha, hb, hab, congr_arg prod.fst hz⟩, a, b, ha, hb, hab, congr_arg prod.snd hz⟩,
506+
end
507+
508+
lemma open_segment_subset (x y : E × F) :
509+
open_segment 𝕜 x y ⊆ open_segment 𝕜 x.1 y.1 ×ˢ open_segment 𝕜 x.2 y.2 :=
510+
begin
511+
rintro z ⟨a, b, ha, hb, hab, hz⟩,
512+
exact ⟨⟨a, b, ha, hb, hab, congr_arg prod.fst hz⟩, a, b, ha, hb, hab, congr_arg prod.snd hz⟩,
513+
end
514+
515+
lemma image_mk_segment_left (x₁ x₂ : E) (y : F) :
516+
(λ x, (x, y)) '' [x₁ -[𝕜] x₂] = [(x₁, y) -[𝕜] (x₂, y)] :=
517+
begin
518+
ext ⟨x', y'⟩,
519+
simp_rw [set.mem_image, segment, set.mem_set_of, prod.smul_mk, prod.mk_add_mk,
520+
prod.mk.inj_iff, ←exists_and_distrib_right, @exists_comm E, exists_eq_left'],
521+
refine exists₅_congr (λ a b ha hb hab, _),
522+
rw convex.combo_self hab,
523+
end
524+
525+
lemma image_mk_segment_right (x : E) (y₁ y₂ : F) :
526+
(λ y, (x, y)) '' [y₁ -[𝕜] y₂] = [(x, y₁) -[𝕜] (x, y₂)] :=
527+
begin
528+
ext ⟨x', y'⟩,
529+
simp_rw [set.mem_image, segment, set.mem_set_of, prod.smul_mk, prod.mk_add_mk,
530+
prod.mk.inj_iff, ←exists_and_distrib_right, @exists_comm F, exists_eq_left'],
531+
refine exists₅_congr (λ a b ha hb hab, _),
532+
rw convex.combo_self hab,
533+
end
534+
535+
lemma image_mk_open_segment_left (x₁ x₂ : E) (y : F) :
536+
(λ x, (x, y)) '' open_segment 𝕜 x₁ x₂ = open_segment 𝕜 (x₁, y) (x₂, y) :=
537+
begin
538+
ext ⟨x', y'⟩,
539+
simp_rw [set.mem_image, open_segment, set.mem_set_of, prod.smul_mk, prod.mk_add_mk,
540+
prod.mk.inj_iff, ←exists_and_distrib_right, @exists_comm E, exists_eq_left'],
541+
refine exists₅_congr (λ a b ha hb hab, _),
542+
rw convex.combo_self hab,
543+
end
544+
545+
@[simp] lemma image_mk_open_segment_right (x : E) (y₁ y₂ : F) :
546+
(λ y, (x, y)) '' open_segment 𝕜 y₁ y₂ = open_segment 𝕜 (x, y₁) (x, y₂) :=
547+
begin
548+
ext ⟨x', y'⟩,
549+
simp_rw [set.mem_image, open_segment, set.mem_set_of, prod.smul_mk, prod.mk_add_mk,
550+
prod.mk.inj_iff, ←exists_and_distrib_right, @exists_comm F, exists_eq_left'],
551+
refine exists₅_congr (λ a b ha hb hab, _),
552+
rw convex.combo_self hab,
553+
end
554+
555+
end prod
556+
557+
namespace pi
558+
variables [ordered_semiring 𝕜] [Π i, add_comm_monoid (π i)] [Π i, module 𝕜 (π i)] {s : set ι}
559+
560+
lemma segment_subset (x y : Π i, π i) : segment 𝕜 x y ⊆ s.pi (λ i, segment 𝕜 (x i) (y i)) :=
561+
by { rintro z ⟨a, b, ha, hb, hab, hz⟩ i -, exact ⟨a, b, ha, hb, hab, congr_fun hz i⟩ }
562+
563+
lemma open_segment_subset (x y : Π i, π i) :
564+
open_segment 𝕜 x y ⊆ s.pi (λ i, open_segment 𝕜 (x i) (y i)) :=
565+
by { rintro z ⟨a, b, ha, hb, hab, hz⟩ i -, exact ⟨a, b, ha, hb, hab, congr_fun hz i⟩ }
566+
567+
variables [decidable_eq ι]
568+
569+
lemma image_update_segment (i : ι) (x₁ x₂ : π i) (y : Π i, π i) :
570+
update y i '' [x₁ -[𝕜] x₂] = [update y i x₁ -[𝕜] update y i x₂] :=
571+
begin
572+
ext z,
573+
simp_rw [set.mem_image, segment, set.mem_set_of, ←update_smul, ←update_add, update_eq_iff,
574+
←exists_and_distrib_right, @exists_comm (π i), exists_eq_left'],
575+
refine exists₅_congr (λ a b ha hb hab, _),
576+
rw convex.combo_self hab,
577+
end
578+
579+
lemma image_update_open_segment (i : ι) (x₁ x₂ : π i) (y : Π i, π i) :
580+
update y i '' open_segment 𝕜 x₁ x₂ = open_segment 𝕜 (update y i x₁) (update y i x₂) :=
581+
begin
582+
ext z,
583+
simp_rw [set.mem_image, open_segment, set.mem_set_of, ←update_smul, ←update_add, update_eq_iff,
584+
←exists_and_distrib_right, @exists_comm (π i), exists_eq_left'],
585+
refine exists₅_congr (λ a b ha hb hab, _),
586+
rw convex.combo_self hab,
587+
end
588+
589+
end pi

0 commit comments

Comments
 (0)