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

Commit dfd4bf5

Browse files
committed
split(analysis/convex/function): move convex_on and concave_on to their own file (#9247)
Convex/concave functions now earn their own file. This cuts down `analysis.convex.basic` by 500 lines.
1 parent 5f140ab commit dfd4bf5

File tree

8 files changed

+597
-579
lines changed

8 files changed

+597
-579
lines changed

src/analysis/convex/basic.lean

Lines changed: 0 additions & 520 deletions
Large diffs are not rendered by default.

src/analysis/convex/combination.lean

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ import analysis.convex.basic
88
/-!
99
# Convex combinations
1010
11-
This file defines convex combinations of points in a vector space and proves the finite Jensen
12-
inequality. The integral version can be found in `analysis.convex.integral`.
11+
This file defines convex combinations of points in a vector space.
1312
1413
## Main declarations
1514
1615
* `finset.center_mass`: Center of mass of a finite family of points.
17-
* `convex_on.map_center_mass_le` `convex_on.map_sum_le`: Convex Jensen's inequality.
1816
1917
## Implementation notes
2018
@@ -171,45 +169,6 @@ begin
171169
cases hi; subst i; simp [hx, hy, if_neg h_cases] } }
172170
end
173171

174-
/-- Convex **Jensen's inequality**, `finset.center_mass` version. -/
175-
lemma convex_on.map_center_mass_le {f : E → ℝ} (hf : convex_on s f)
176-
(h₀ : ∀ i ∈ t, 0 ≤ w i) (hpos : 0 < ∑ i in t, w i)
177-
(hmem : ∀ i ∈ t, z i ∈ s) : f (t.center_mass w z) ≤ t.center_mass w (f ∘ z) :=
178-
begin
179-
have hmem' : ∀ i ∈ t, (z i, (f ∘ z) i) ∈ {p : E × ℝ | p.1 ∈ s ∧ f p.1 ≤ p.2},
180-
from λ i hi, ⟨hmem i hi, le_rfl⟩,
181-
convert (hf.convex_epigraph.center_mass_mem h₀ hpos hmem').2;
182-
simp only [center_mass, function.comp, prod.smul_fst, prod.fst_sum, prod.smul_snd, prod.snd_sum]
183-
end
184-
185-
/-- Convex **Jensen's inequality**, `finset.sum` version. -/
186-
lemma convex_on.map_sum_le {f : E → ℝ} (hf : convex_on s f)
187-
(h₀ : ∀ i ∈ t, 0 ≤ w i) (h₁ : ∑ i in t, w i = 1)
188-
(hmem : ∀ i ∈ t, z i ∈ s) : f (∑ i in t, w i • z i) ≤ ∑ i in t, w i * (f (z i)) :=
189-
by simpa only [center_mass, h₁, inv_one, one_smul]
190-
using hf.map_center_mass_le h₀ (h₁.symm ▸ zero_lt_one) hmem
191-
192-
/-- If a function `f` is convex on `s` takes value `y` at the center of mass of some points
193-
`z i ∈ s`, then for some `i` we have `y ≤ f (z i)`. -/
194-
lemma convex_on.exists_ge_of_center_mass {f : E → ℝ} (h : convex_on s f)
195-
(hw₀ : ∀ i ∈ t, 0 ≤ w i) (hws : 0 < ∑ i in t, w i) (hz : ∀ i ∈ t, z i ∈ s) :
196-
∃ i ∈ t, f (t.center_mass w z) ≤ f (z i) :=
197-
begin
198-
set y := t.center_mass w z,
199-
have : f y ≤ t.center_mass w (f ∘ z) := h.map_center_mass_le hw₀ hws hz,
200-
rw ← sum_filter_ne_zero at hws,
201-
rw [← finset.center_mass_filter_ne_zero (f ∘ z), center_mass, smul_eq_mul,
202-
← div_eq_inv_mul, le_div_iff hws, mul_sum] at this,
203-
replace : ∃ i ∈ t.filter (λ i, w i ≠ 0), f y * w i ≤ w i • (f ∘ z) i :=
204-
exists_le_of_sum_le (nonempty_of_sum_ne_zero (ne_of_gt hws)) this,
205-
rcases this with ⟨i, hi, H⟩,
206-
rw [mem_filter] at hi,
207-
use [i, hi.1],
208-
simp only [smul_eq_mul, mul_comm (w i)] at H,
209-
refine (mul_le_mul_right _).1 H,
210-
exact lt_of_le_of_ne (hw₀ i hi.1) hi.2.symm
211-
end
212-
213172
lemma finset.center_mass_mem_convex_hull (t : finset ι) {w : ι → ℝ} (hw₀ : ∀ i ∈ t, 0 ≤ w i)
214173
(hws : 0 < ∑ i in t, w i) {z : ι → E} (hz : ∀ i ∈ t, z i ∈ s) :
215174
t.center_mass w z ∈ convex_hull ℝ s :=
@@ -246,18 +205,6 @@ begin
246205
exact t.center_mass_mem_convex_hull hw₀ (hw₁.symm ▸ zero_lt_one) hz }
247206
end
248207

249-
/-- Maximum principle for convex functions. If a function `f` is convex on the convex hull of `s`,
250-
then `f` can't have a maximum on `convex_hull s` outside of `s`. -/
251-
lemma convex_on.exists_ge_of_mem_convex_hull {f : E → ℝ} (hf : convex_on (convex_hull ℝ s) f)
252-
{x} (hx : x ∈ convex_hull ℝ s) : ∃ y ∈ s, f x ≤ f y :=
253-
begin
254-
rw convex_hull_eq at hx,
255-
rcases hx with ⟨α, t, w, z, hw₀, hw₁, hz, rfl⟩,
256-
rcases hf.exists_ge_of_center_mass hw₀ (hw₁.symm ▸ zero_lt_one)
257-
(λ i hi, subset_convex_hull ℝ s (hz i hi)) with ⟨i, hit, Hi⟩,
258-
exact ⟨z i, hz i hit, Hi⟩
259-
end
260-
261208
lemma finset.convex_hull_eq (s : finset E) :
262209
convex_hull ℝ ↑s = {x : E | ∃ (w : E → ℝ) (hw₀ : ∀ y ∈ s, 0 ≤ w y) (hw₁ : ∑ y in s, w y = 1),
263210
s.center_mass w id = x} :=

src/analysis/convex/exposed.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Yaël Dillies, Bhavik Mehta
55
-/
66
import analysis.convex.extreme
7+
import analysis.convex.function
78
import analysis.normed_space.basic
89

910
/-!

src/analysis/convex/extrema.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2020 Frédéric Dupuis. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Frédéric Dupuis
55
-/
6-
import analysis.convex.basic
6+
import analysis.convex.function
77
import topology.algebra.affine
88
import topology.local_extr
99

0 commit comments

Comments
 (0)