@@ -5,7 +5,7 @@ Authors: Johan Commelin, Scott Morrison
5
5
-/
6
6
import analysis.convex.combination
7
7
import linear_algebra.affine_space.independent
8
- import data.real.basic
8
+ import tactic.field_simp
9
9
10
10
/-!
11
11
# Carathéodory's convexity theorem
@@ -21,7 +21,7 @@ contains `x`. Thus the difference from the case of affine span is that the affin
21
21
depends on `x`.
22
22
23
23
In particular, in finite dimensions Carathéodory's theorem implies that the convex hull of a set `s`
24
- in `ℝᵈ ` is the union of the convex hulls of the `(d+ 1)`-tuples in `s`.
24
+ in `𝕜ᵈ ` is the union of the convex hulls of the `(d + 1)`-tuples in `s`.
25
25
26
26
## Main results
27
27
@@ -36,20 +36,19 @@ convex hull, caratheodory
36
36
37
37
-/
38
38
39
- universes u
40
-
41
39
open set finset
42
40
open_locale big_operators
43
41
44
- variables {E : Type u} [add_comm_group E] [module ℝ E]
42
+ universes u
43
+ variables {𝕜 : Type *} {E : Type u} [linear_ordered_field 𝕜] [add_comm_group E] [module 𝕜 E]
45
44
46
45
namespace caratheodory
47
46
48
47
/-- If `x` is in the convex hull of some finset `t` whose elements are not affine-independent,
49
48
then it is in the convex hull of a strict subset of `t`. -/
50
49
lemma mem_convex_hull_erase [decidable_eq E] {t : finset E}
51
- (h : ¬ affine_independent ℝ (coe : t → E)) {x : E} (m : x ∈ convex_hull ℝ (↑t : set E)) :
52
- ∃ (y : (↑t : set E)), x ∈ convex_hull ℝ (↑(t.erase y) : set E) :=
50
+ (h : ¬ affine_independent 𝕜 (coe : t → E)) {x : E} (m : x ∈ convex_hull 𝕜 (↑t : set E)) :
51
+ ∃ (y : (↑t : set E)), x ∈ convex_hull 𝕜 (↑(t.erase y) : set E) :=
53
52
begin
54
53
simp only [finset.convex_hull_eq, mem_set_of_eq] at m ⊢,
55
54
obtain ⟨f, fpos, fsum, rfl⟩ := m,
63
62
exact ⟨x, mem_filter.mpr ⟨hx, hgx⟩⟩ },
64
63
have hg : 0 < g i₀ := by { rw mem_filter at mem, exact mem.2 },
65
64
have hi₀ : i₀ ∈ t := filter_subset _ _ mem,
66
- let k : E → ℝ := λ z, f z - (f i₀ / g i₀) * g z,
65
+ let k : E → 𝕜 := λ z, f z - (f i₀ / g i₀) * g z,
67
66
have hk : k i₀ = 0 := by field_simp [k, ne_of_gt hg],
68
67
have ksum : ∑ e in t.erase i₀, k e = 1 ,
69
68
{ calc ∑ e in t.erase i₀, k e = ∑ e in t, k e :
@@ -89,36 +88,36 @@ begin
89
88
sub_zero, center_mass, fsum, inv_one, one_smul, id.def] }
90
89
end
91
90
92
- variables {s : set E} {x : E} (hx : x ∈ convex_hull ℝ s)
91
+ variables {s : set E} {x : E} (hx : x ∈ convex_hull 𝕜 s)
93
92
include hx
94
93
95
94
/-- Given a point `x` in the convex hull of a set `s`, this is a finite subset of `s` of minimum
96
95
cardinality, whose convex hull contains `x`. -/
97
96
noncomputable def min_card_finset_of_mem_convex_hull : finset E :=
98
- function.argmin_on finset.card nat.lt_wf { t | ↑t ⊆ s ∧ x ∈ convex_hull ℝ (t : set E) }
97
+ function.argmin_on finset.card nat.lt_wf { t | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) }
99
98
(by simpa only [convex_hull_eq_union_convex_hull_finite_subsets s, exists_prop, mem_Union] using hx)
100
99
101
100
lemma min_card_finset_of_mem_convex_hull_subseteq : ↑(min_card_finset_of_mem_convex_hull hx) ⊆ s :=
102
- (function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull ℝ (t : set E) } _).1
101
+ (function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) } _).1
103
102
104
103
lemma mem_min_card_finset_of_mem_convex_hull :
105
- x ∈ convex_hull ℝ (min_card_finset_of_mem_convex_hull hx : set E) :=
106
- (function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull ℝ (t : set E) } _).2
104
+ x ∈ convex_hull 𝕜 (min_card_finset_of_mem_convex_hull hx : set E) :=
105
+ (function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) } _).2
107
106
108
107
lemma min_card_finset_of_mem_convex_hull_nonempty :
109
108
(min_card_finset_of_mem_convex_hull hx).nonempty :=
110
109
begin
111
- rw [← finset.coe_nonempty, ← @convex_hull_nonempty_iff ℝ ],
110
+ rw [← finset.coe_nonempty, ← @convex_hull_nonempty_iff 𝕜 ],
112
111
exact ⟨x, mem_min_card_finset_of_mem_convex_hull hx⟩,
113
112
end
114
113
115
114
lemma min_card_finset_of_mem_convex_hull_card_le_card
116
- {t : finset E} (ht₁ : ↑t ⊆ s) (ht₂ : x ∈ convex_hull ℝ (t : set E)) :
115
+ {t : finset E} (ht₁ : ↑t ⊆ s) (ht₂ : x ∈ convex_hull 𝕜 (t : set E)) :
117
116
(min_card_finset_of_mem_convex_hull hx).card ≤ t.card :=
118
117
function.argmin_on_le _ _ _ ⟨ht₁, ht₂⟩
119
118
120
119
lemma affine_independent_min_card_finset_of_mem_convex_hull :
121
- affine_independent ℝ (coe : min_card_finset_of_mem_convex_hull hx → E) :=
120
+ affine_independent 𝕜 (coe : min_card_finset_of_mem_convex_hull hx → E) :=
122
121
begin
123
122
let k := (min_card_finset_of_mem_convex_hull hx).card - 1 ,
124
123
have hk : (min_card_finset_of_mem_convex_hull hx).card = k + 1 ,
@@ -142,8 +141,8 @@ variables {s : set E}
142
141
143
142
/-- **Carathéodory's convexity theorem** -/
144
143
lemma convex_hull_eq_union :
145
- convex_hull ℝ s =
146
- ⋃ (t : finset E) (hss : ↑t ⊆ s) (hai : affine_independent ℝ (coe : t → E)), convex_hull ℝ ↑t :=
144
+ convex_hull 𝕜 s =
145
+ ⋃ (t : finset E) (hss : ↑t ⊆ s) (hai : affine_independent 𝕜 (coe : t → E)), convex_hull 𝕜 ↑t :=
147
146
begin
148
147
apply set.subset.antisymm,
149
148
{ intros x hx,
@@ -157,9 +156,9 @@ begin
157
156
end
158
157
159
158
/-- A more explicit version of `convex_hull_eq_union`. -/
160
- theorem eq_pos_convex_span_of_mem_convex_hull {x : E} (hx : x ∈ convex_hull ℝ s) :
161
- ∃ (ι : Sort (u+1 )) (_ : fintype ι), by exactI ∃ (z : ι → E) (w : ι → ℝ )
162
- (hss : set.range z ⊆ s) (hai : affine_independent ℝ z)
159
+ theorem eq_pos_convex_span_of_mem_convex_hull {x : E} (hx : x ∈ convex_hull 𝕜 s) :
160
+ ∃ (ι : Sort (u+1 )) (_ : fintype ι), by exactI ∃ (z : ι → E) (w : ι → 𝕜 )
161
+ (hss : set.range z ⊆ s) (hai : affine_independent 𝕜 z)
163
162
(hw : ∀ i, 0 < w i), ∑ i, w i = 1 ∧ ∑ i, w i • z i = x :=
164
163
begin
165
164
rw convex_hull_eq_union at hx,
0 commit comments