Convex Analysis (Rockafellar, 1970) -- Chapter 02 -- Section 08 -- Part 3
noncomputable sectionopen scoped RealInnerProductSpaceopen scoped Pointwise Topologyopen Metricsection Chap02section Section08
If every x โ C satisfies x + y โ C, then the translation of C by y stays in C.
lemma image_add_subset_of_add_mem {n : Nat} {C : Set (EuclideanSpace Real (Fin n))}
{y : EuclideanSpace Real (Fin n)} (h : โ x โ C, x + y โ C) :
Set.image (fun x => x + y) C โ C := by
intro z hz
rcases hz with โจx, hx, rflโฉ
exact h x hx
If every x โ C satisfies x - y โ C, then C is contained in its translation by y.
lemma subset_image_add_of_sub_mem {n : Nat} {C : Set (EuclideanSpace Real (Fin n))}
{y : EuclideanSpace Real (Fin n)} (h : โ x โ C, x + (-y) โ C) :
C โ Set.image (fun x => x + y) C := by
intro x hx
refine โจx + (-y), h x hx, ?_โฉ
simp [add_assoc]
If C is invariant under translation by y, then C is closed under adding y and -y.
lemma add_mem_of_image_eq {n : Nat} {C : Set (EuclideanSpace Real (Fin n))}
{y : EuclideanSpace Real (Fin n)}
(hEq : Set.image (fun x => x + y) C = C) :
(โ x โ C, x + y โ C) โง (โ x โ C, x + (-y) โ C) := by
constructor
ยท intro x hx
have hx' : x + y โ Set.image (fun x => x + y) C := โจx, hx, rflโฉ
simpa [hEq] using hx'
ยท intro x hx
have hx' : x โ Set.image (fun x => x + y) C := by
simpa [hEq] using hx
rcases hx' with โจx0, hx0, hx0eqโฉ
have : x + (-y) = x0 := by
calc
x + (-y) = (x0 + y) + (-y) := by simp [hx0eq.symm]
_ = x0 := by simp [add_assoc]
simpa [this] using hx0
Theorem 8.4.5. For any non-empty convex set C, the lineality space
equals { y โ โ^n | C + y = C }.
theorem linealitySpace_eq_translation {n : Nat} {C : Set (EuclideanSpace Real (Fin n))}
(hCne : C.Nonempty) (hCconv : Convex Real C) :
(-Set.recessionCone C) โฉ Set.recessionCone C =
{ y : EuclideanSpace Real (Fin n) | Set.image (fun x => x + y) C = C } := by
rcases hCne with โจx0, hx0โฉ
ext y
constructor
ยท intro hy
rcases hy with โจhyneg, hyposโฉ
have hypos' : โ x โ C, x + y โ C := by
simpa [recessionCone_eq_add_mem (C := C) hCconv] using hypos
have hyneg' : โ x โ C, x + (-y) โ C := by
have hyneg_mem : -y โ Set.recessionCone C := by
simpa using hyneg
simpa [recessionCone_eq_add_mem (C := C) hCconv] using hyneg_mem
apply Set.Subset.antisymm
ยท exact image_add_subset_of_add_mem (C := C) (y := y) hypos'
ยท exact subset_image_add_of_sub_mem (C := C) (y := y) hyneg'
ยท intro hy
have hy' :
(โ x โ C, x + y โ C) โง (โ x โ C, x + (-y) โ C) :=
add_mem_of_image_eq (C := C) (y := y) hy
rcases hy' with โจhypos, hynegโฉ
have hypos_mem : y โ Set.recessionCone C := by
simpa [recessionCone_eq_add_mem (C := C) hCconv] using hypos
have hyneg_mem : -y โ Set.recessionCone C := by
simpa [recessionCone_eq_add_mem (C := C) hCconv] using hyneg
have hyneg_mem' : y โ -Set.recessionCone C := by
simpa using hyneg_mem
exact โจhyneg_mem', hypos_memโฉ
Definiton 8.4.6. Let C be a non-empty convex set with lineality space
. The rank of C is defined by .
noncomputable def Set.rank {n : Nat} (C : Set (EuclideanSpace Real (Fin n))) : Nat :=
Module.finrank Real (affineSpan Real C).direction -
Module.finrank Real (Submodule.span Real ((-Set.recessionCone C) โฉ Set.recessionCone C))Proper convexity implies the domain is nonempty.
lemma properConvexFunctionOn_nonempty {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ EReal} (hf : ProperConvexFunctionOn C f) : C.Nonempty := by
rcases hf.2.1 with โจp, hpโฉ
exact โจp.1, hp.1โฉThe difference-quotient set used in the recession formula is nonempty.
lemma diffQuotient_set_nonempty {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real}
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal))) :
โ y : Fin n โ Real,
( { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } ).Nonempty := by
intro y
rcases properConvexFunctionOn_nonempty (f := fun x => (f x : EReal)) hf with โจx, hxโฉ
exact โจ((f (x + y) - f x : Real) : EReal), x, hx, rflโฉ
The recession formula forces f0_plus 0 = 0.
lemma recessionFunction_zero {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
f0_plus (0 : Fin n โ Real) = (0 : EReal) := by
rcases properConvexFunctionOn_nonempty (f := fun x => (f x : EReal)) hf with โจx, hxโฉ
have hset :
{ r : EReal | โ x' โ C, r = ((f (x' + (0 : Fin n โ Real)) - f x' : Real) : EReal) } =
{ (0 : EReal) } := by
ext r
constructor
ยท intro hr
rcases hr with โจx', hx', rflโฉ
simp
ยท intro hr
rcases hr with rfl
refine โจx, hx, ?_โฉ
simp
calc
f0_plus (0 : Fin n โ Real)
= sSup { r : EReal |
โ x' โ C, r = ((f (x' + (0 : Fin n โ Real)) - f x' : Real) : EReal) } := hf0_plus _
_ = sSup ({(0 : EReal)} : Set EReal) := by
rw [hset]
_ = (0 : EReal) := by simp
The recession formula prevents f0_plus from taking the value โฅ.
lemma recessionFunction_ne_bot {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
โ y : Fin n โ Real, f0_plus y โ (โฅ : EReal) := by
intro y hbot
rcases diffQuotient_set_nonempty (C := C) (f := f) hf y with โจr, hrโฉ
rcases hr with โจx, hx, rflโฉ
have hrle :
((f (x + y) - f x : Real) : EReal) โค
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } :=
le_sSup โจx, hx, rflโฉ
have hsup_bot :
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } =
(โฅ : EReal) := by
simpa [hf0_plus y] using hbot
have hrle' :
((f (x + y) - f x : Real) : EReal) โค (โฅ : EReal) := by
calc
((f (x + y) - f x : Real) : EReal) โค
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } := hrle
_ = (โฅ : EReal) := hsup_bot
have hbot' :
((f (x + y) - f x : Real) : EReal) = (โฅ : EReal) :=
(le_bot_iff).1 hrle'
have hne : ((f (x + y) - f x : Real) : EReal) โ (โฅ : EReal) := by
simpa using (EReal.coe_ne_bot (f (x + y) - f x))
exact hne hbot'The recession formula gives a pointwise inequality characterization.
lemma recessionFunction_le_iff {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
โ y : Fin n โ Real, โ v : Real,
f0_plus y โค (v : EReal) โ
โ x โ C, ((f (x + y) - f x : Real) : EReal) โค (v : EReal) := by
intro y v
constructor
ยท intro hle x hx
have hle' :
((f (x + y) - f x : Real) : EReal) โค
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } :=
le_sSup โจx, hx, rflโฉ
have hle'' :
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } โค
(v : EReal) := by
simpa [hf0_plus y] using hle
exact le_trans hle' hle''
ยท intro h
have hsup :
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } โค
(v : EReal) := by
refine sSup_le ?_
intro r hr
rcases hr with โจx, hx, rflโฉ
exact h x hx
simpa [hf0_plus y] using hsupThe epigraph of the recession function is nonempty, witnessed at the origin.
lemma recessionFunction_epigraph_nonempty {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
Set.Nonempty (epigraph (Set.univ : Set (Fin n โ Real)) f0_plus) := by
refine โจ((0 : Fin n โ Real), (0 : Real)), ?_โฉ
have hzero :
f0_plus (0 : Fin n โ Real) = (0 : EReal) :=
recessionFunction_zero (C := C) (f := f) (f0_plus := f0_plus) hf hf0_plus
have hle : f0_plus (0 : Fin n โ Real) โค (0 : EReal) := by
simp [hzero]
exact (mem_epigraph_univ_iff).2 hle
Proper convexity on the whole space gives real-valued convexity on Set.univ.
lemma convexOn_real_of_convexFunctionOn_ereal_univ {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} (hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal))) :
ConvexOn โ (Set.univ : Set (Fin n โ Real)) f := by
classical
have hconvE : ConvexFunctionOn (Set.univ : Set (Fin n โ Real)) (fun x => (f x : EReal)) := by
simpa [hC] using hf.1
have hnotbot :
โ x โ (Set.univ : Set (Fin n โ Real)), (fun x => (f x : EReal)) x โ (โฅ : EReal) := by
intro x hx
have hx' : x โ C := by simp [hC]
exact hf.2.2 x hx'
have hseg :
โ x โ (Set.univ : Set (Fin n โ Real)), โ y โ (Set.univ : Set (Fin n โ Real)),
โ t : Real, 0 < t โ t < 1 โ
(f ((1 - t) โข x + t โข y) : EReal) โค
((1 - t : Real) : EReal) * f x + ((t : Real) : EReal) * f y := by
have hconv_seg :=
(convexFunctionOn_iff_segment_inequality
(C := (Set.univ : Set (Fin n โ Real)))
(f := fun x => (f x : EReal))
(hC := convex_univ) (hnotbot := hnotbot)).1 hconvE
intro x hx y hy t ht0 ht1
simpa using (hconv_seg x hx y hy t ht0 ht1)
refine โจconvex_univ, ?_โฉ
intro x hx y hy a b ha hb hab
by_cases hb0 : b = 0
ยท subst hb0
have ha' : a = 1 := by linarith
subst ha'
simp
by_cases hb1 : b = 1
ยท subst hb1
have ha' : a = 0 := by linarith
subst ha'
simp
have hb0' : 0 < b := lt_of_le_of_ne hb (Ne.symm hb0)
have hb1' : b < 1 := by
have hb_le : b โค 1 := by linarith
exact lt_of_le_of_ne hb_le hb1
have hseg' := hseg x (by simp) y (by simp) b hb0' hb1'
have hseg'' :
(f ((1 - b) โข x + b โข y) : EReal) โค
((1 - b) * f x + b * f y : Real) := by
have hrhs :
((1 - b : Real) : EReal) * f x + ((b : Real) : EReal) * f y =
((1 - b) * f x + b * f y : Real) := by
simp [EReal.coe_mul, EReal.coe_add, add_comm]
simpa [hrhs] using hseg'
have hreal :
f ((1 - b) โข x + b โข y) โค (1 - b) * f x + b * f y :=
(EReal.coe_le_coe_iff).1 hseg''
have ha' : a = 1 - b := by linarith
subst ha'
simpa using hreal
A convex real function with bounded unit increments along y has bounded increments at all
positive scales.
lemma recessionFunction_ray_bound_real {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} (hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal))) :
โ {y : Fin n โ Real} {v : Real},
(โ x, f (x + y) - f x โค v) โ
โ t > 0, โ x, f (x + t โข y) - f x โค t * v := by
classical
intro y v hstep t ht x
have hstep_nat : โ n : Nat, โ x, f (x + (n : Real) โข y) - f x โค (n : Real) * v := by
intro n
induction n with
| zero =>
intro x
simp
| succ n hn =>
intro x
have hstep' : f (x + (n : Real) โข y + y) - f (x + (n : Real) โข y) โค v := by
simpa [add_assoc] using hstep (x + (n : Real) โข y)
have hxy : x + (n : Real) โข y + y = x + ((n + 1 : Nat) : Real) โข y := by
ext i
simp [Nat.cast_add, Nat.cast_one, add_assoc, add_mul]
have hsum :
f (x + ((n + 1 : Nat) : Real) โข y) - f x =
(f (x + (n : Real) โข y) - f x) +
(f (x + ((n + 1 : Nat) : Real) โข y) - f (x + (n : Real) โข y)) := by
ring
calc
f (x + ((n + 1 : Nat) : Real) โข y) - f x
= (f (x + (n : Real) โข y) - f x) +
(f (x + ((n + 1 : Nat) : Real) โข y) - f (x + (n : Real) โข y)) := hsum
_ โค (n : Real) * v + v := by
have hn' := hn x
have hstep'' :
f (x + ((n + 1 : Nat) : Real) โข y) - f (x + (n : Real) โข y) โค v := by
simpa [hxy] using hstep'
exact add_le_add hn' hstep''
_ = ((n : Real) + 1) * v := by ring
_ = ((n + 1 : Nat) : Real) * v := by
simp [Nat.cast_add, Nat.cast_one]
obtain โจm, hmโฉ := exists_nat_ge t
have hm0 : 0 < (m : Real) := lt_of_lt_of_le ht hm
have hs0 : 0 โค t / (m : Real) := by
have hm0' : 0 โค (m : Real) := le_of_lt hm0
exact div_nonneg (le_of_lt ht) hm0'
have hs1 : t / (m : Real) โค 1 := by
have hm0' : 0 < (m : Real) := hm0
have : t โค (1 : Real) * (m : Real) := by simpa [one_mul] using hm
exact (div_le_iffโ hm0').2 this
have hconv :
ConvexOn โ (Set.univ : Set (Fin n โ Real)) f :=
convexOn_real_of_convexFunctionOn_ereal_univ (C := C) (f := f) hC hf
set s : Real := t / (m : Real) with hs
have hs0' : 0 โค s := by simpa [hs] using hs0
have hs1' : s โค 1 := by simpa [hs] using hs1
have hconvineq :
f ((1 - s) โข x + s โข (x + (m : Real) โข y)) โค
(1 - s) * f x + s * f (x + (m : Real) โข y) := by
have hconv' :=
hconv.2 (x := x) (y := x + (m : Real) โข y) (by simp) (by simp)
exact hconv' (a := 1 - s) (b := s) (by linarith [hs1']) hs0' (by ring)
have hm0' : (m : Real) โ 0 := ne_of_gt hm0
have hsn : s * (m : Real) = t := by
calc
s * (m : Real) = (t / (m : Real)) * (m : Real) := by simp [hs]
_ = t := by field_simp [hm0']
have hlin : (1 - s) โข x + (s โข x + s โข (m : Real) โข y) = x + t โข y := by
ext i
simp [hsn, smul_smul, add_comm, add_assoc, sub_eq_add_neg]
ring
have hineq :
f (x + t โข y) โค (1 - s) * f x + s * f (x + (m : Real) โข y) := by
simpa [hlin] using hconvineq
have hineq' :
f (x + t โข y) โค f x + s * (f (x + (m : Real) โข y) - f x) := by
calc
f (x + t โข y) โค (1 - s) * f x + s * f (x + (m : Real) โข y) := hineq
_ = f x + s * (f (x + (m : Real) โข y) - f x) := by ring
have hdiff :
f (x + t โข y) - f x โค s * (f (x + (m : Real) โข y) - f x) := by
exact (sub_le_iff_le_add).2 (by simpa [add_comm, add_left_comm, add_assoc] using hineq')
have hbound_n : f (x + (m : Real) โข y) - f x โค (m : Real) * v := hstep_nat m x
have hdiff' : f (x + t โข y) - f x โค s * ((m : Real) * v) := by
have hmul := mul_le_mul_of_nonneg_left hbound_n hs0'
exact le_trans hdiff hmul
calc
f (x + t โข y) - f x โค s * ((m : Real) * v) := hdiff'
_ = (s * (m : Real)) * v := by ring
_ = t * v := by simp [hsn]
The ray bound rewritten in EReal form for the recession function.
lemma recessionFunction_ray_bound {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} (hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal))) :
โ {y : Fin n โ Real} {v : Real},
(โ x, ((f (x + y) - f x : Real) : EReal) โค (v : EReal)) โ
โ t > 0, โ x,
((f (x + t โข y) - f x : Real) : EReal) โค ((t * v : Real) : EReal) := by
intro y v hstep t ht x
have hstep' : โ x, f (x + y) - f x โค v := by
intro x
have hx := hstep x
exact (EReal.coe_le_coe_iff).1 (by simpa using hx)
have hbound :
f (x + t โข y) - f x โค t * v :=
recessionFunction_ray_bound_real (C := C) (f := f) hC hf hstep' t ht x
exact (EReal.coe_le_coe_iff).2 (by simpa using hbound)
A pointwise bound on f0_plus is equivalent to bounds on all ray difference quotients.
lemma recessionFunction_le_iff_ray {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
โ y : Fin n โ Real, โ v : Real,
f0_plus y โค (v : EReal) โ
โ x : Fin n โ Real, โ t : Real, 0 < t โ
((f (x + t โข y) - f x) / t : Real) โค v := by
intro y v
constructor
ยท intro hle x t ht
have hstep :
โ x, ((f (x + y) - f x : Real) : EReal) โค (v : EReal) := by
intro x
have hx : x โ C := by simp [hC]
exact
(recessionFunction_le_iff (C := C) (f := f) (f0_plus := f0_plus) hf0_plus y v).1 hle x
hx
have hbound :
((f (x + t โข y) - f x : Real) : EReal) โค ((t * v : Real) : EReal) :=
recessionFunction_ray_bound (C := C) (f := f) hC hf (y := y) (v := v) hstep t ht x
have hbound_real : f (x + t โข y) - f x โค t * v := by
exact (EReal.coe_le_coe_iff).1 (by simpa using hbound)
have hbound_real' : f (x + t โข y) - f x โค v * t := by
simpa [mul_comm] using hbound_real
exact (div_le_iffโ ht).2 hbound_real'
ยท intro h
have hstep :
โ x โ C, ((f (x + y) - f x : Real) : EReal) โค (v : EReal) := by
intro x hx
have h' :
((f (x + (1 : Real) โข y) - f x) / (1 : Real) : Real) โค v :=
h x 1 (by exact zero_lt_one)
have h'' : f (x + y) - f x โค v := by
simpa using h'
exact (EReal.coe_le_coe_iff).2 h''
exact
(recessionFunction_le_iff (C := C) (f := f) (f0_plus := f0_plus) hf0_plus y v).2 hstepSubadditivity of the recession formula when the domain is the whole space.
lemma recessionFunction_subadditive_univ {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
โ y1 y2 : Fin n โ Real, f0_plus (y1 + y2) โค f0_plus y1 + f0_plus y2 := by
classical
intro y1 y2
have hle :
sSup { r : EReal | โ x โ C, r = ((f (x + y1 + y2) - f x : Real) : EReal) } โค
f0_plus y1 + f0_plus y2 := by
refine sSup_le ?_
intro r hr
rcases hr with โจx, hx, rflโฉ
have hx' : x + y1 โ C := by
simp [hC]
have h1 :
((f (x + y1) - f x : Real) : EReal) โค f0_plus y1 := by
have hmem :
((f (x + y1) - f x : Real) : EReal) โ
{ r : EReal | โ x โ C, r = ((f (x + y1) - f x : Real) : EReal) } := by
exact โจx, hx, rflโฉ
have hle :=
le_sSup hmem
simpa [hf0_plus] using hle
have h2 :
((f (x + y1 + y2) - f (x + y1) : Real) : EReal) โค f0_plus y2 := by
have h2' :
((f ((x + y1) + y2) - f (x + y1) : Real) : EReal) โค f0_plus y2 := by
have hmem :
((f ((x + y1) + y2) - f (x + y1) : Real) : EReal) โ
{ r : EReal | โ x โ C, r = ((f (x + y2) - f x : Real) : EReal) } := by
exact โจx + y1, hx', rflโฉ
have hle := le_sSup hmem
simpa [hf0_plus] using hle
simpa [add_assoc] using h2'
have hsum_real :
f (x + y1 + y2) - f x =
(f (x + y1) - f x) + (f (x + y1 + y2) - f (x + y1)) := by
ring
have hsum :
((f (x + y1 + y2) - f x : Real) : EReal) =
((f (x + y1) - f x : Real) : EReal) +
((f (x + y1 + y2) - f (x + y1) : Real) : EReal) := by
rw [hsum_real, EReal.coe_add]
calc
((f (x + y1 + y2) - f x : Real) : EReal)
= ((f (x + y1) - f x : Real) : EReal) +
((f (x + y1 + y2) - f (x + y1) : Real) : EReal) := hsum
_ โค f0_plus y1 + f0_plus y2 := add_le_add h1 h2
simpa [hf0_plus, add_assoc] using hle
Convexity of the recession function on Set.univ from subadditivity and pos. homogeneity.
lemma recessionFunction_convex_univ {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) })
(hpos : PositivelyHomogeneous f0_plus) :
ConvexFunctionOn (Set.univ : Set (Fin n โ Real)) f0_plus := by
have hsub :
โ y1 y2 : Fin n โ Real, f0_plus (y1 + y2) โค f0_plus y1 + f0_plus y2 :=
recessionFunction_subadditive_univ (C := C) (f := f) (f0_plus := f0_plus) hC hf0_plus
have hnotbot :
โ y : Fin n โ Real, f0_plus y โ (โฅ : EReal) :=
recessionFunction_ne_bot (C := C) (f := f) (f0_plus := f0_plus) hf hf0_plus
have hconv : ConvexFunction f0_plus :=
convex_of_subadditive_posHom (hpos := hpos) hsub hnotbot
simpa [ConvexFunction] using hconvAlong a fixed ray, the difference quotient is monotone in the step length.
lemma differenceQuotient_monotone {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} (hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal))) :
โ x y : Fin n โ Real,
Monotone (fun t : {t : โ // 0 < t} => (f (x + (t : โ) โข y) - f x) / (t : โ)) := by
classical
intro x y s t hst
let L : โ โแต[โ] (Fin n โ Real) := AffineMap.lineMap (k := โ) x (x + y)
have hconv :
ConvexOn โ (Set.univ : Set (Fin n โ Real)) f :=
convexOn_real_of_convexFunctionOn_ereal_univ (C := C) (f := f) hC hf
have hconv_comp :
ConvexOn โ (Set.univ : Set โ)
(fun t => f (L t)) := by
simpa [L] using (hconv.comp_affineMap (AffineMap.lineMap (k := โ) x (x + y)))
have hlineMap :
โ t : โ, L t = x + t โข y := by
intro t
simpa [L, vadd_eq_add, add_comm, add_left_comm, add_assoc] using
(AffineMap.lineMap_vadd_apply (k := โ) (p := x) (v := y) (c := t))
have hx0 : L 0 = x := by
simp [L]
have hsec :
(f (L (s : โ)) - f (L 0)) /
((s : โ) - 0) โค
(f (L (t : โ)) - f (L 0)) /
((t : โ) - 0) :=
hconv_comp.secant_mono (a := 0) (x := (s : โ)) (y := (t : โ)) (by simp) (by simp) (by simp)
(ne_of_gt s.2) (ne_of_gt t.2) (by simpa using hst)
simpa [hlineMap, hx0] using hsec
Rewrite the recession formula as an iSup over base points.
lemma recessionFunction_iSup_formula {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) }) :
โ y : Fin n โ Real,
f0_plus y =
โจ x : Fin n โ Real, ((f (x + y) - f x : Real) : EReal) := by
intro y
have hset :
{ r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } =
Set.range (fun x : Fin n โ Real => ((f (x + y) - f x : Real) : EReal)) := by
ext r
constructor
ยท intro hr
rcases hr with โจx, hx, rflโฉ
exact โจx, rflโฉ
ยท intro hr
rcases hr with โจx, rflโฉ
exact โจx, by simp [hC], rflโฉ
calc
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) } := hf0_plus _
_ = sSup (Set.range (fun x : Fin n โ Real => ((f (x + y) - f x : Real) : EReal))) := by
rw [hset]
_ = โจ x : Fin n โ Real, ((f (x + y) - f x : Real) : EReal) := by
simp [sSup_range]
Closedness of f implies lower semicontinuity of the recession function.
lemma recessionFunction_lsc_of_closed {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) })
(hclosed : ClosedConvexFunction (fun x => (f x : EReal))) :
LowerSemicontinuous f0_plus := by
have hf0_plus_iSup :=
recessionFunction_iSup_formula (C := C) (f := f) (f0_plus := f0_plus) hC hf0_plus
have hls_f : LowerSemicontinuous (fun x => (f x : EReal)) := hclosed.2
have hclosed_sub :
โ ฮฑ : Real, IsClosed {x : Fin n โ Real | (f x : EReal) โค (ฮฑ : EReal)} :=
(lowerSemicontinuous_iff_closed_sublevel (f := fun x => (f x : EReal))).1 hls_f
have hls_diff :
โ x : Fin n โ Real,
LowerSemicontinuous (fun y : Fin n โ Real => ((f (x + y) - f x : Real) : EReal)) := by
intro x
refine
(lowerSemicontinuous_iff_closed_sublevel
(f := fun y => ((f (x + y) - f x : Real) : EReal))).2 ?_
intro ฮฑ
have hset :
{y : Fin n โ Real | ((f (x + y) - f x : Real) : EReal) โค (ฮฑ : EReal)} =
{y : Fin n โ Real | (f (x + y) : EReal) โค ((ฮฑ + f x : Real) : EReal)} := by
ext y
constructor
ยท intro hy
have hy' : f (x + y) - f x โค ฮฑ :=
(EReal.coe_le_coe_iff).1 (by simpa using hy)
have : f (x + y) โค ฮฑ + f x := by linarith
exact (EReal.coe_le_coe_iff).2 this
ยท intro hy
have hy' : f (x + y) โค ฮฑ + f x :=
(EReal.coe_le_coe_iff).1 (by simpa using hy)
have : f (x + y) - f x โค ฮฑ := by linarith
exact (EReal.coe_le_coe_iff).2 this
have hcont : Continuous (fun y : Fin n โ Real => x + y) := by
simpa using (continuous_const.add continuous_id)
have hclosed_pre :
IsClosed {y : Fin n โ Real | (f (x + y) : EReal) โค ((ฮฑ + f x : Real) : EReal)} := by
have hclosed_sub' :
IsClosed {z : Fin n โ Real | (f z : EReal) โค ((ฮฑ + f x : Real) : EReal)} :=
hclosed_sub (ฮฑ + f x)
simpa [Set.preimage] using hclosed_sub'.preimage hcont
exact hset โธ hclosed_pre
have hls :
LowerSemicontinuous
(fun y : Fin n โ Real =>
โจ x : Fin n โ Real, ((f (x + y) - f x : Real) : EReal)) :=
lowerSemicontinuous_iSup hls_diff
have hf0_plus_eq :
f0_plus = fun y : Fin n โ Real => โจ x : Fin n โ Real, ((f (x + y) - f x : Real) : EReal) := by
funext y
exact hf0_plus_iSup y
simpa [hf0_plus_eq] using hls
The embedded epigraph is closed when f is lower semicontinuous.
lemma closed_embedded_epigraph {n : Nat} {f : (Fin n โ Real) โ EReal}
(hls : LowerSemicontinuous f) :
let C : Set (EuclideanSpace Real (Fin (n + 1))) :=
(appendAffineEquiv n 1) ''
((fun p : (Fin n โ Real) ร Real =>
((EuclideanSpace.equiv (๐ := Real) (ฮน := Fin n)).symm p.1,
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin 1)).symm
(fun _ : Fin 1 => p.2))) ''
epigraph (S := (Set.univ : Set (Fin n โ Real))) f)
IsClosed C := by
classical
dsimp
have hclosed_sub :
โ ฮฑ : Real, IsClosed {x : Fin n โ Real | f x โค (ฮฑ : EReal)} :=
(lowerSemicontinuous_iff_closed_sublevel (f := f)).1 hls
have hclosed_epi :
IsClosed (epigraph (Set.univ : Set (Fin n โ Real)) f) :=
closed_epigraph_of_closed_sublevel (f := f) hclosed_sub
let eN : (Fin n โ Real) โแต[Real] EuclideanSpace Real (Fin n) :=
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin n)).symm.toLinearEquiv.toAffineEquiv
let e1 : Real โแต[Real] EuclideanSpace Real (Fin 1) :=
((ContinuousLinearEquiv.funUnique (ฮน := Fin 1) (R := Real) (M := Real)).symm.toLinearEquiv.trans
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin 1)).symm.toLinearEquiv).toAffineEquiv
let g : (Fin n โ Real) ร Real โแต[Real]
(EuclideanSpace Real (Fin n) ร EuclideanSpace Real (Fin 1)) :=
AffineEquiv.prodCongr eN e1
have hC_eq :
((fun p : (Fin n โ Real) ร Real =>
((EuclideanSpace.equiv (๐ := Real) (ฮน := Fin n)).symm p.1,
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin 1)).symm
(fun _ : Fin 1 => p.2))) ''
epigraph (S := (Set.univ : Set (Fin n โ Real))) f) =
g '' epigraph (S := (Set.univ : Set (Fin n โ Real))) f := by
ext q; constructor
ยท rintro โจp, hp, rflโฉ
refine โจp, hp, ?_โฉ
simp [g, eN, e1]
rfl
ยท rintro โจp, hp, rflโฉ
refine โจp, hp, ?_โฉ
simp [g, eN, e1]
rfl
have hclosed_g :
IsClosed (g '' epigraph (Set.univ : Set (Fin n โ Real)) f) := by
let hhome := g.toHomeomorphOfFiniteDimensional
have hclosed' :
IsClosed ((hhome : _ โ _) '' epigraph (Set.univ : Set (Fin n โ Real)) f) :=
(hhome.isClosed_image (s := epigraph (Set.univ : Set (Fin n โ Real)) f)).2 hclosed_epi
simpa [hhome, AffineEquiv.coe_toHomeomorphOfFiniteDimensional] using hclosed'
have hclosed_C :
IsClosed ((appendAffineEquiv n 1) '' (g '' epigraph (Set.univ : Set (Fin n โ Real)) f)) := by
let hhome := (appendAffineEquiv n 1).toHomeomorphOfFiniteDimensional
have hclosed' :
IsClosed ((hhome : _ โ _) '' (g '' epigraph (Set.univ : Set (Fin n โ Real)) f)) :=
(hhome.isClosed_image (s := g '' epigraph (Set.univ : Set (Fin n โ Real)) f)).2 hclosed_g
simpa [hhome, AffineEquiv.coe_toHomeomorphOfFiniteDimensional] using hclosed'
simpa [hC_eq] using hclosed_CThe embedded epigraph map sends affine rays to affine rays.
lemma embedded_epigraph_add_smul {n : Nat} :
let eN : (Fin n โ Real) โแต[Real] EuclideanSpace Real (Fin n) :=
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin n)).symm.toLinearEquiv.toAffineEquiv
let e1 : Real โแต[Real] EuclideanSpace Real (Fin 1) :=
((ContinuousLinearEquiv.funUnique (ฮน := Fin 1) (R := Real)
(M := Real)).symm.toLinearEquiv.trans
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin 1)).symm.toLinearEquiv).toAffineEquiv
let g : (Fin n โ Real) ร Real โแต[Real]
(EuclideanSpace Real (Fin n) ร EuclideanSpace Real (Fin 1)) :=
AffineEquiv.prodCongr eN e1
let embed : (Fin n โ Real) ร Real โ EuclideanSpace Real (Fin (n + 1)) :=
fun p => appendAffineEquiv n 1 (g p)
let dir : (Fin n โ Real) ร Real โ EuclideanSpace Real (Fin (n + 1)) :=
fun q => (appendAffineEquiv n 1).linear (g.linear q)
โ p q : (Fin n โ Real) ร Real, โ t : Real,
embed (p + t โข q) = embed p + t โข dir q := by
classical
intro eN e1 g embed dir p q t
let A : (Fin n โ Real) ร Real โแต[Real] EuclideanSpace Real (Fin (n + 1)) :=
(appendAffineEquiv n 1).toAffineMap.comp g
have hA : embed = (A : (Fin n โ Real) ร Real โ EuclideanSpace Real (Fin (n + 1))) := rfl
have hdir : dir = fun q => A.linear q := rfl
have hmap :
A (p + t โข q) = A.linear (t โข q) + A p := by
simpa [vadd_eq_add, add_comm, add_left_comm, add_assoc] using (A.map_vadd p (t โข q))
calc
embed (p + t โข q) = A (p + t โข q) := rfl
_ = A.linear (t โข q) + A p := hmap
_ = t โข A.linear q + A p := by
simp [map_smul]
_ = A p + t โข A.linear q := by
exact add_comm _ _
_ = embed p + t โข dir q := by
rw [hA, hdir]
A ray bound at one base point extends to all base points for closed convex f.
lemma ray_bound_extend_closed {n : Nat} {f : (Fin n โ Real) โ Real}
{x0 y : Fin n โ Real} {v : Real}
(hclosed : ClosedConvexFunction (fun x => (f x : EReal)))
(hbound : โ t > 0, ((f (x0 + t โข y) - f x0) / t : Real) โค v) :
โ x : Fin n โ Real, โ t : Real, 0 < t โ
((f (x + t โข y) - f x) / t : Real) โค v := by
classical
let eN : (Fin n โ Real) โแต[Real] EuclideanSpace Real (Fin n) :=
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin n)).symm.toLinearEquiv.toAffineEquiv
let e1 : Real โแต[Real] EuclideanSpace Real (Fin 1) :=
((ContinuousLinearEquiv.funUnique (ฮน := Fin 1) (R := Real) (M := Real)).symm.toLinearEquiv.trans
(EuclideanSpace.equiv (๐ := Real) (ฮน := Fin 1)).symm.toLinearEquiv).toAffineEquiv
let g : (Fin n โ Real) ร Real โแต[Real]
(EuclideanSpace Real (Fin n) ร EuclideanSpace Real (Fin 1)) :=
AffineEquiv.prodCongr eN e1
let embed : (Fin n โ Real) ร Real โ EuclideanSpace Real (Fin (n + 1)) :=
fun p => appendAffineEquiv n 1 (g p)
let dir : (Fin n โ Real) ร Real โ EuclideanSpace Real (Fin (n + 1)) :=
fun q => (appendAffineEquiv n 1).linear (g.linear q)
let Cemb : Set (EuclideanSpace Real (Fin (n + 1))) :=
(appendAffineEquiv n 1) ''
(g '' epigraph (Set.univ : Set (Fin n โ Real)) (fun x => (f x : EReal)))
have hdir_eq :
โ p q : (Fin n โ Real) ร Real, โ t : Real,
embed (p + t โข q) = embed p + t โข dir q := by
intro p q t
simpa [embed, dir, g, eN, e1] using
(embedded_epigraph_add_smul (n := n) (p := p) (q := q) (t := t))
have hCemb_closed : IsClosed Cemb := by
simpa [Cemb, g, eN, e1] using
(closed_embedded_epigraph (n := n) (f := fun x => (f x : EReal)) hclosed.2)
have hCemb_convex : Convex โ Cemb := by
have hconv : ConvexFunction (fun x => (f x : EReal)) := hclosed.1
simpa [Cemb, g, eN, e1] using
(convex_embedded_epigraph (n := n) (f := fun x => (f x : EReal)) hconv)
have hCemb_nonempty : Cemb.Nonempty := by
refine โจembed (0, f 0), ?_โฉ
refine โจg (0, f 0), ?_, rflโฉ
refine โจ(0, f 0), ?_, rflโฉ
exact (mem_epigraph_univ_iff).2 (by simp)
have hhalf :
โ t : Real, 0 โค t โ embed (x0, f x0) + t โข dir (y, v) โ Cemb := by
intro t ht
have hmem_epi :
(x0 + t โข y, f x0 + t * v) โ
epigraph (Set.univ : Set (Fin n โ Real)) (fun x => (f x : EReal)) := by
by_cases ht0 : t = 0
ยท subst ht0
simp [mem_epigraph_univ_iff]
ยท have htpos : 0 < t := lt_of_le_of_ne ht (Ne.symm ht0)
have hq : ((f (x0 + t โข y) - f x0) / t : Real) โค v := hbound t htpos
have hineq : f (x0 + t โข y) โค f x0 + t * v := by
have hq' : f (x0 + t โข y) - f x0 โค v * t := (div_le_iffโ htpos).1 hq
linarith
exact (mem_epigraph_univ_iff).2 ((EReal.coe_le_coe_iff).2 hineq)
have hmem_Cemb : embed (x0 + t โข y, f x0 + t * v) โ Cemb := by
refine โจg (x0 + t โข y, f x0 + t * v), ?_, rflโฉ
exact โจ(x0 + t โข y, f x0 + t * v), hmem_epi, rflโฉ
have hdir' := hdir_eq (p := (x0, f x0)) (q := (y, v)) (t := t)
have hdir'' :
embed (x0 + t โข y, f x0 + t * v) = embed (x0, f x0) + t โข dir (y, v) := by
simpa using hdir'
simpa [hdir''] using hmem_Cemb
have hdir_mem :
dir (y, v) โ Set.recessionCone Cemb :=
halfline_mem_recessionCone (C := Cemb) hCemb_nonempty hCemb_closed hCemb_convex
(x0 := embed (x0, f x0)) (y := dir (y, v)) hhalf
intro x t ht
have hx_mem : embed (x, f x) โ Cemb := by
refine โจg (x, f x), ?_, rflโฉ
refine โจ(x, f x), ?_, rflโฉ
exact (mem_epigraph_univ_iff).2 (by simp)
have hmem := hdir_mem hx_mem (t := t) (by exact le_of_lt ht)
have hdir' := hdir_eq (p := (x, f x)) (q := (y, v)) (t := t)
have hmem' : embed (x + t โข y, f x + t * v) โ Cemb := by
have hdir'' :
embed (x + t โข y, f x + t * v) = embed (x, f x) + t โข dir (y, v) := by
simpa using hdir'
simpa [hdir''] using hmem
have hmem_epi :
(x + t โข y, f x + t * v) โ
epigraph (Set.univ : Set (Fin n โ Real)) (fun x => (f x : EReal)) := by
rcases hmem' with โจp, hp, hp_eqโฉ
have hp_eq' : p = g (x + t โข y, f x + t * v) := by
apply (appendAffineEquiv n 1).injective
simpa [embed] using hp_eq
have hp' :
g (x + t โข y, f x + t * v) โ
g '' epigraph (Set.univ : Set (Fin n โ Real)) (fun x => (f x : EReal)) := by
simpa [hp_eq'] using hp
rcases hp' with โจq, hq, hq_eqโฉ
have hq_eq' : q = (x + t โข y, f x + t * v) := by
exact g.injective hq_eq
simpa [hq_eq'] using hq
have hle_ereal :
(f (x + t โข y) : EReal) โค ((f x + t * v : Real) : EReal) :=
(mem_epigraph_univ_iff).1 hmem_epi
have hle_real : f (x + t โข y) โค f x + t * v :=
(EReal.coe_le_coe_iff).1 (by simpa using hle_ereal)
have hle_real' : f (x + t โข y) - f x โค v * t := by
have hle' : f (x + t โข y) - f x โค t * v := by linarith
simpa [mul_comm] using hle'
exact (div_le_iffโ ht).2 hle_real'Closed convexity makes the ray supremum independent of the base point.
lemma ray_sSup_eq_of_closed {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) })
(hpos : PositivelyHomogeneous f0_plus)
(hclosed : ClosedConvexFunction (fun x => (f x : EReal))) :
โ x y : Fin n โ Real,
f0_plus y =
sSup { r : EReal |
โ t : Real, 0 < t โง r = (((f (x + t โข y) - f x) / t : Real) : EReal) } := by
classical
intro x y
set S : Set EReal :=
{ r : EReal |
โ t : Real, 0 < t โง r = (((f (x + t โข y) - f x) / t : Real) : EReal) } with hS
have hiff :
โ v : Real, f0_plus y โค (v : EReal) โ
โ t > 0, ((f (x + t โข y) - f x) / t : Real) โค v := by
intro v
constructor
ยท intro hle t ht
have hle' :=
(recessionFunction_le_iff_ray (C := C) (f := f) (f0_plus := f0_plus) hC hf hf0_plus y v).1
hle
exact hle' x t ht
ยท intro hbound
have hbound' :
โ x' : Fin n โ Real, โ t : Real, 0 < t โ
((f (x' + t โข y) - f x') / t : Real) โค v := by
intro x' t ht
exact ray_bound_extend_closed (f := f) (x0 := x) (y := y) (v := v) hclosed hbound x' t ht
exact
(recessionFunction_le_iff_ray (C := C) (f := f) (f0_plus := f0_plus) hC hf hf0_plus y v).2
hbound'
have hle_sup : f0_plus y โค sSup S := by
refine (le_sSup_iff).2 ?_
intro b hb
rcases (EReal.exists (p := fun r => r = b)).1 โจb, rflโฉ with hb_bot | hb_top | hb_real
ยท have hS_nonempty : S.Nonempty := by
refine โจ(((f (x + (1 : Real) โข y) - f x) / (1 : Real) : Real) : EReal), ?_โฉ
exact โจ1, by exact zero_lt_one, by simpโฉ
rcases hS_nonempty with โจr, hrโฉ
have hbot : r โค (โฅ : EReal) := by
simpa [hb_bot.symm] using hb hr
have hbot' : r = (โฅ : EReal) := (le_bot_iff).1 hbot
rcases hr with โจt, ht, rflโฉ
simp at hbot'
ยท have hb_top' : b = (โค : EReal) := hb_top.symm
simp [hb_top']
ยท rcases hb_real with โจv, rflโฉ
have hbound : โ t > 0, ((f (x + t โข y) - f x) / t : Real) โค v := by
intro t ht
have hr : (((f (x + t โข y) - f x) / t : Real) : EReal) โ S :=
โจt, ht, rflโฉ
have hr_le : (((f (x + t โข y) - f x) / t : Real) : EReal) โค (v : EReal) := hb hr
exact (EReal.coe_le_coe_iff).1 (by simpa using hr_le)
exact (hiff v).2 hbound
have hsup_le : sSup S โค f0_plus y := by
refine (sSup_le_iff).2 ?_
intro r hr
rcases hr with โจt, ht, rflโฉ
rcases (EReal.exists (p := fun r => r = f0_plus y)).1 โจf0_plus y, rflโฉ with hbot | htop | hreal
ยท have hne :
f0_plus y โ (โฅ : EReal) :=
recessionFunction_ne_bot (C := C) (f := f) (f0_plus := f0_plus) hf hf0_plus y
exact (hne hbot.symm).elim
ยท have htop' : f0_plus y = (โค : EReal) := htop.symm
simp [htop']
ยท rcases hreal with โจw, hwโฉ
have hx : x โ C := by simp [hC]
have hle_sSup :
((f (x + t โข y) - f x : Real) : EReal) โค f0_plus (t โข y) := by
have hmem :
((f (x + t โข y) - f x : Real) : EReal) โ
{ r : EReal | โ x โ C, r = ((f (x + t โข y) - f x : Real) : EReal) } := by
exact โจx, hx, rflโฉ
have hsup := le_sSup hmem
simpa [hf0_plus] using hsup
have hpos' : f0_plus (t โข y) = (t : EReal) * f0_plus y := hpos y t ht
have hle' :
((f (x + t โข y) - f x : Real) : EReal) โค (t : EReal) * (w : EReal) := by
simpa [hpos', hw] using hle_sSup
have hle_real :
f (x + t โข y) - f x โค t * w := by
have hle'' :
((f (x + t โข y) - f x : Real) : EReal) โค ((t * w : Real) : EReal) := by
simpa [EReal.coe_mul, hw] using hle'
exact (EReal.coe_le_coe_iff).1 hle''
have hle_div : ((f (x + t โข y) - f x) / t : Real) โค w := by
exact (div_le_iffโ ht).2 (by simpa [mul_comm] using hle_real)
have hle_ereal :
(((f (x + t โข y) - f x) / t : Real) : EReal) โค (w : EReal) :=
(EReal.coe_le_coe_iff).2 hle_div
simpa [hw] using hle_ereal
exact le_antisymm hle_sup hsup_le
Along a fixed ray, the difference quotient converges to f0_plus.
lemma ray_limit_monotone {n : Nat} {C : Set (Fin n โ Real)}
{f : (Fin n โ Real) โ Real} {f0_plus : (Fin n โ Real) โ EReal}
(hC : C = Set.univ)
(hf : ProperConvexFunctionOn C (fun x => (f x : EReal)))
(hf0_plus :
โ y : Fin n โ Real,
f0_plus y =
sSup { r : EReal | โ x โ C, r = ((f (x + y) - f x : Real) : EReal) })
(hpos : PositivelyHomogeneous f0_plus)
(hclosed : ClosedConvexFunction (fun x => (f x : EReal))) :
โ x y : Fin n โ Real,
Filter.Tendsto
(fun t : Real => (((f (x + t โข y) - f x) / t : Real) : EReal))
Filter.atTop (๐ (f0_plus y)) := by
classical
intro x y
let fquot : โ โ EReal :=
fun t => (((f (x + t โข y) - f x) / t : Real) : EReal)
let q : {t : โ // 0 < t} โ EReal :=
fun t => fquot (t : โ)
have hmono : Monotone q := by
intro s t hst
have hst' :=
(differenceQuotient_monotone (C := C) (f := f) hC hf x y) hst
exact (EReal.coe_le_coe_iff).2 (by simpa using hst')
have htend_sub : Filter.Tendsto q Filter.atTop (๐ (โจ t, q t)) :=
tendsto_atTop_iSup hmono
have hset :
{ r : EReal |
โ t : Real, 0 < t โง r = (((f (x + t โข y) - f x) / t : Real) : EReal) } =
Set.range q := by
ext r
constructor
ยท intro hr
rcases hr with โจt, ht, rflโฉ
refine โจโจt, htโฉ, ?_โฉ
simp [q, fquot]
ยท intro hr
rcases hr with โจt, rflโฉ
exact โจt, t.2, by simp [q, fquot]โฉ
have hsup_eq :
f0_plus y = (โจ t, q t) := by
have hsup :=
ray_sSup_eq_of_closed (C := C) (f := f) (f0_plus := f0_plus) hC hf hf0_plus hpos hclosed x y
have hsup' :
sSup { r : EReal |
โ t : Real, 0 < t โง r = (((f (x + t โข y) - f x) / t : Real) : EReal) } =
(โจ t, q t) := by
calc
sSup { r : EReal |
โ t : Real, 0 < t โง r = (((f (x + t โข y) - f x) / t : Real) : EReal) }
= sSup (Set.range q) := by simp [hset]
_ = โจ t, q t := by
simp [sSup_range]
exact hsup.trans hsup'
have htend_sub' : Filter.Tendsto q Filter.atTop (๐ (f0_plus y)) := by
simpa [hsup_eq] using htend_sub
have htend_map :
Filter.Tendsto fquot
(Filter.map ((โ) : {t : โ // 0 < t} โ โ) Filter.atTop) (๐ (f0_plus y)) := by
exact (Filter.tendsto_map'_iff).2 (by simpa [q, fquot] using htend_sub')
have hmap_eq :
Filter.map ((โ) : {t : โ // 0 < t} โ โ) Filter.atTop = Filter.atTop := by
change Filter.map ((โ) : Set.Ioi (0 : โ) โ โ) Filter.atTop = Filter.atTop
simp
have htend_map' : Filter.Tendsto fquot Filter.atTop (๐ (f0_plus y)) := by
simpa [hmap_eq] using htend_map
simpa [fquot] using htend_map'end Section08end Chap02