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

Commit 5f803fa

Browse files
committed
feat(analysis/convex/function): helper lemmas and general cleanup (#9438)
This adds * `convex_iff_pairwise_on_pos` * `convex_on_iff_forall_pos`, `concave_on_iff_forall_pos`, * `convex_on_iff_forall_pos_ne`, `concave_on_iff_forall_pos_ne` * `convex_on.convex_strict_epigraph`, `concave_on.convex_strict_hypograph` generalizes some instance assumptions: * `convex_on.translate_` didn't need `module 𝕜 β` but `has_scalar 𝕜 β`. * some proofs in `analysis.convex.exposed` were vestigially using `ℝ`. and golfs proofs.
1 parent 7b02277 commit 5f803fa

File tree

3 files changed

+147
-83
lines changed

3 files changed

+147
-83
lines changed

src/analysis/convex/basic.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,20 @@ begin
507507
exact h hx hy ha hb hab
508508
end
509509

510+
lemma convex_iff_pairwise_on_pos :
511+
convex 𝕜 s ↔ s.pairwise_on (λ x y, ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s) :=
512+
begin
513+
refine ⟨λ h x hx y hy _ a b ha hb hab, h hx hy ha.le hb.le hab, _⟩,
514+
intros h x y hx hy a b ha hb hab,
515+
obtain rfl | ha' := ha.eq_or_lt,
516+
{ rw [zero_add] at hab, rwa [hab, zero_smul, one_smul, zero_add] },
517+
obtain rfl | hb' := hb.eq_or_lt,
518+
{ rw [add_zero] at hab, rwa [hab, zero_smul, one_smul, add_zero] },
519+
obtain rfl | hxy := eq_or_ne x y,
520+
{ rwa convex.combo_self hab },
521+
exact h _ hx _ hy hxy ha' hb' hab,
522+
end
523+
510524
lemma convex_iff_open_segment_subset :
511525
convex 𝕜 s ↔ ∀ ⦃x y⦄, x ∈ s → y ∈ s → open_segment 𝕜 x y ⊆ s :=
512526
begin

src/analysis/convex/exposed.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ begin
7474
exact hx.1,
7575
end
7676

77-
@[refl] lemma refl (A : set E) : is_exposed 𝕜 A A :=
77+
@[refl] protected lemma refl (A : set E) : is_exposed 𝕜 A A :=
7878
λ ⟨w, hw⟩, ⟨0, subset.antisymm (λ x hx, ⟨hx, λ y hy, by exact le_refl 0⟩) (λ x hx, hx.1)⟩
7979

80-
lemma antisymm (hB : is_exposed 𝕜 A B) (hA : is_exposed 𝕜 B A) :
80+
protected lemma antisymm (hB : is_exposed 𝕜 A B) (hA : is_exposed 𝕜 B A) :
8181
A = B :=
8282
hA.subset.antisymm hB.subset
8383

@@ -113,7 +113,7 @@ begin
113113
(λ x hx, ⟨hx.1, λ y hy, (hw.2 y hy).trans hx.2⟩)⟩,
114114
end
115115

116-
lemma inter (hB : is_exposed 𝕜 A B) (hC : is_exposed 𝕜 A C) :
116+
protected lemma inter (hB : is_exposed 𝕜 A B) (hC : is_exposed 𝕜 A C) :
117117
is_exposed 𝕜 A (B ∩ C) :=
118118
begin
119119
rintro ⟨w, hwB, hwC⟩,
@@ -186,18 +186,18 @@ begin
186186
{ exact convex_empty },
187187
obtain ⟨l, rfl⟩ := hAB hB,
188188
exact λ x₁ x₂ hx₁ 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).concave_ge _
189+
((l.to_linear_map.concave_on convex_univ).convex_ge _
190190
⟨mem_univ _, hx₁.2 y hy⟩ ⟨mem_univ _, hx₂.2 y hy⟩ ha hb hab).2⟩,
191191
end
192192

193-
lemma is_closed [normed_space ℝ E] (hAB : is_exposed A B) (hA : is_closed A) :
193+
protected lemma is_closed [order_closed_topology 𝕜] (hAB : is_exposed 𝕜 A B) (hA : is_closed A) :
194194
is_closed B :=
195195
begin
196196
obtain ⟨l, a, rfl⟩ := hAB.eq_inter_halfspace,
197197
exact hA.is_closed_le continuous_on_const l.continuous.continuous_on,
198198
end
199199

200-
lemma is_compact [normed_space ℝ E] (hAB : is_exposed A B) (hA : is_compact A) :
200+
protected lemma is_compact [order_closed_topology 𝕜] (hAB : is_exposed 𝕜 A B) (hA : is_compact A) :
201201
is_compact B :=
202202
compact_of_is_closed_subset hA (hAB.is_closed hA.is_closed) hAB.subset
203203

@@ -237,7 +237,7 @@ begin
237237
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⟩⟩⟩,
238238
end
239239

240-
lemma exposed_points_subset_extreme_points [normed_space ℝ E] :
241-
A.exposed_points ⊆ A.extreme_points :=
240+
lemma exposed_points_subset_extreme_points :
241+
A.exposed_points 𝕜 ⊆ A.extreme_points 𝕜 :=
242242
λ x hx, mem_extreme_points_iff_extreme_singleton.2
243243
(mem_exposed_points_iff_exposed_singleton.1 hx).is_extreme

0 commit comments

Comments
 (0)