@@ -3,9 +3,11 @@ Copyright (c) 2019 Alexander Bentkamp. All rights reserved.
3
3
Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Alexander Bentkamp, François Dupuis
5
5
-/
6
- import analysis.convex.combination
7
- import data.real.basic
6
+ import analysis.convex.basic
8
7
import algebra.module.ordered
8
+ import tactic.field_simp
9
+ import tactic.linarith
10
+ import tactic.ring
9
11
10
12
/-!
11
13
# Convex and concave functions
@@ -24,7 +26,6 @@ a convex set.
24
26
* `concave_on 𝕜 s f`: The function `f` is concave on `s` with scalars `𝕜`.
25
27
* `strict_convex_on 𝕜 s f`: The function `f` is strictly convex on `s` with scalars `𝕜`.
26
28
* `strict_concave_on 𝕜 s f`: The function `f` is strictly concave on `s` with scalars `𝕜`.
27
- * `convex_on.map_center_mass_le` `convex_on.map_sum_le`: Convex Jensen's inequality.
28
29
-/
29
30
30
31
open finset linear_map set
@@ -502,101 +503,3 @@ lemma concave_on_iff_div {f : E → β} :
502
503
end has_scalar
503
504
end ordered_add_comm_monoid
504
505
end linear_ordered_field
505
-
506
-
507
-
508
-
509
-
510
-
511
-
512
- /-! ### Jensen's inequality -/
513
-
514
- section jensen
515
- variables [linear_ordered_field 𝕜] [add_comm_group E] [ordered_add_comm_group β] [module 𝕜 E]
516
- [module 𝕜 β] [ordered_smul 𝕜 β] {s : set E} {f : E → β} {t : finset ι} {w : ι → 𝕜} {p : ι → E}
517
-
518
- /-- Convex **Jensen's inequality** , `finset.center_mass` version. -/
519
- lemma convex_on.map_center_mass_le (hf : convex_on 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
520
- (h₁ : 0 < ∑ i in t, w i) (hmem : ∀ i ∈ t, p i ∈ s) :
521
- f (t.center_mass w p) ≤ t.center_mass w (f ∘ p) :=
522
- begin
523
- have hmem' : ∀ i ∈ t, (p i, (f ∘ p) i) ∈ {p : E × β | p.1 ∈ s ∧ f p.1 ≤ p.2 },
524
- from λ i hi, ⟨hmem i hi, le_rfl⟩,
525
- convert (hf.convex_epigraph.center_mass_mem h₀ h₁ hmem').2 ;
526
- simp only [center_mass, function.comp, prod.smul_fst, prod.fst_sum,
527
- prod.smul_snd, prod.snd_sum],
528
- end
529
-
530
- /-- Concave **Jensen's inequality** , `finset.center_mass` version. -/
531
- lemma concave_on.le_map_center_mass (hf : concave_on 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i)
532
- (h₁ : 0 < ∑ i in t, w i) (hmem : ∀ i ∈ t, p i ∈ s) :
533
- t.center_mass w (f ∘ p) ≤ f (t.center_mass w p) :=
534
- @convex_on.map_center_mass_le 𝕜 E (order_dual β) _ _ _ _ _ _ _ _ _ _ _ _ hf h₀ h₁ hmem
535
-
536
- /-- Convex **Jensen's inequality** , `finset.sum` version. -/
537
- lemma convex_on.map_sum_le (hf : convex_on 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i) (h₁ : ∑ i in t, w i = 1 )
538
- (hmem : ∀ i ∈ t, p i ∈ s) :
539
- f (∑ i in t, w i • p i) ≤ ∑ i in t, w i • f (p i) :=
540
- by simpa only [center_mass, h₁, inv_one, one_smul]
541
- using hf.map_center_mass_le h₀ (h₁.symm ▸ zero_lt_one) hmem
542
-
543
- /-- Concave **Jensen's inequality** , `finset.sum` version. -/
544
- lemma concave_on.le_map_sum (hf : concave_on 𝕜 s f) (h₀ : ∀ i ∈ t, 0 ≤ w i) (h₁ : ∑ i in t, w i = 1 )
545
- (hmem : ∀ i ∈ t, p i ∈ s) :
546
- ∑ i in t, w i • f (p i) ≤ f (∑ i in t, w i • p i) :=
547
- @convex_on.map_sum_le 𝕜 E (order_dual β) _ _ _ _ _ _ _ _ _ _ _ _ hf h₀ h₁ hmem
548
-
549
- end jensen
550
-
551
- /-! ### Maximum principle -/
552
-
553
- section maximum_principle
554
- variables [linear_ordered_field 𝕜] [add_comm_group E] [linear_ordered_add_comm_group β]
555
- [module 𝕜 E] [module 𝕜 β] [ordered_smul 𝕜 β] {s : set E} {f : E → β} {t : finset ι} {w : ι → 𝕜}
556
- {p : ι → E}
557
-
558
- /-- If a function `f` is convex on `s`, then the value it takes at some center of mass of points of
559
- `s` is less than the value it takes on one of those points. -/
560
- lemma convex_on.exists_ge_of_center_mass (h : convex_on 𝕜 s f)
561
- (hw₀ : ∀ i ∈ t, 0 ≤ w i) (hw₁ : 0 < ∑ i in t, w i) (hp : ∀ i ∈ t, p i ∈ s) :
562
- ∃ i ∈ t, f (t.center_mass w p) ≤ f (p i) :=
563
- begin
564
- set y := t.center_mass w p,
565
- suffices h : ∃ i ∈ t.filter (λ i, w i ≠ 0 ), w i • f y ≤ w i • (f ∘ p) i,
566
- { obtain ⟨i, hi, hfi⟩ := h,
567
- rw mem_filter at hi,
568
- exact ⟨i, hi.1 , (smul_le_smul_iff_of_pos $ (hw₀ i hi.1 ).lt_of_ne hi.2 .symm).1 hfi⟩ },
569
- have hw' : (0 : 𝕜) < ∑ i in filter (λ i, w i ≠ 0 ) t, w i := by rwa sum_filter_ne_zero,
570
- refine exists_le_of_sum_le (nonempty_of_sum_ne_zero hw'.ne') _,
571
- rw [←sum_smul, ←smul_le_smul_iff_of_pos (inv_pos.2 hw'), inv_smul_smul' hw'.ne',
572
- ←finset.center_mass, finset.center_mass_filter_ne_zero],
573
- exact h.map_center_mass_le hw₀ hw₁ hp,
574
- apply_instance,
575
- end
576
-
577
- /-- If a function `f` is concave on `s`, then the value it takes at some center of mass of points of
578
- `s` is greater than the value it takes on one of those points. -/
579
- lemma concave_on.exists_le_of_center_mass (h : concave_on 𝕜 s f)
580
- (hw₀ : ∀ i ∈ t, 0 ≤ w i) (hw₁ : 0 < ∑ i in t, w i) (hp : ∀ i ∈ t, p i ∈ s) :
581
- ∃ i ∈ t, f (p i) ≤ f (t.center_mass w p) :=
582
- @convex_on.exists_ge_of_center_mass 𝕜 E (order_dual β) _ _ _ _ _ _ _ _ _ _ _ _ h hw₀ hw₁ hp
583
-
584
- /-- Maximum principle for convex functions. If a function `f` is convex on the convex hull of `s`,
585
- then the eventual maximum of `f` on `convex_hull 𝕜 s` lies in `s`. -/
586
- lemma convex_on.exists_ge_of_mem_convex_hull (hf : convex_on 𝕜 (convex_hull 𝕜 s) f) {x}
587
- (hx : x ∈ convex_hull 𝕜 s) : ∃ y ∈ s, f x ≤ f y :=
588
- begin
589
- rw _root_.convex_hull_eq at hx,
590
- obtain ⟨α, t, w, p, hw₀, hw₁, hp, rfl⟩ := hx,
591
- rcases hf.exists_ge_of_center_mass hw₀ (hw₁.symm ▸ zero_lt_one)
592
- (λ i hi, subset_convex_hull 𝕜 s (hp i hi)) with ⟨i, hit, Hi⟩,
593
- exact ⟨p i, hp i hit, Hi⟩
594
- end
595
-
596
- /-- Minimum principle for concave functions. If a function `f` is concave on the convex hull of `s`,
597
- then the eventual minimum of `f` on `convex_hull 𝕜 s` lies in `s`. -/
598
- lemma concave_on.exists_le_of_mem_convex_hull (hf : concave_on 𝕜 (convex_hull 𝕜 s) f) {x}
599
- (hx : x ∈ convex_hull 𝕜 s) : ∃ y ∈ s, f y ≤ f x :=
600
- @convex_on.exists_ge_of_mem_convex_hull 𝕜 E (order_dual β) _ _ _ _ _ _ _ _ hf _ hx
601
-
602
- end maximum_principle
0 commit comments