Convex Analysis (Rockafellar, 1970) -- Chapter 02 -- Section 07 -- Part 2
noncomputable sectionopen scoped Topologysection Chap02section Section07
The Ξ±-sublevel of the liminf is the intersection of closed ΞΌ-sublevel sets above Ξ±.
lemma sublevel_liminf_eq_iInter_closure_sublevel {n : Nat}
(f : (Fin n β Real) β EReal) (Ξ± : Real) :
{x | Filter.liminf (fun y : Fin n β Real => f y) (π x) β€ (Ξ± : EReal)} =
β (ΞΌ : {ΞΌ : Real // ΞΌ > Ξ±}),
closure {x | f x β€ ((ΞΌ : Real) : EReal)} := by
ext x
constructor
Β· intro hx
exact liminf_le_mem_iInter_closure_sublevel (f := f) (Ξ± := Ξ±) (x := x) hx
Β· intro hx
exact liminf_le_of_mem_iInter_closure_sublevel (f := f) (Ξ± := Ξ±) (x := x) hx
Text 7.0.11: For each Ξ± β β,
{x | (convexFunctionClosure f) x β€ Ξ±} = β (ΞΌ > Ξ±), closure {x | f x β€ ΞΌ}.
theorem sublevel_convexFunctionClosure_eq_iInter_closure_sublevel {n : Nat}
(f : (Fin n β Real) β EReal) (Ξ± : Real) (hbot : β x, f x β (β₯ : EReal)) :
{x | convexFunctionClosure f x β€ (Ξ± : EReal)} =
β (ΞΌ : {ΞΌ : Real // ΞΌ > Ξ±}),
closure {x | f x β€ ((ΞΌ : Real) : EReal)} := by
have hliminf := (epigraph_convexFunctionClosure_eq_closure_epigraph (f := f) hbot).2
ext x
constructor
Β· intro hx
have hx' :
Filter.liminf (fun y : Fin n β Real => f y) (π x) β€ (Ξ± : EReal) := by
simpa [hliminf x] using hx
exact liminf_le_mem_iInter_closure_sublevel (f := f) (Ξ± := Ξ±) (x := x) hx'
Β· intro hx
have hx' :
Filter.liminf (fun y : Fin n β Real => f y) (π x) β€ (Ξ± : EReal) :=
liminf_le_of_mem_iInter_closure_sublevel (f := f) (Ξ± := Ξ±) (x := x) hx
simpa [hliminf x] using hx'The closure of a function is pointwise below the function itself.
lemma convexFunctionClosure_le_self {n : Nat} (f : (Fin n β Real) β EReal) :
convexFunctionClosure f β€ f := by
classical
by_cases hbot : β x, f x β (β₯ : EReal)
Β· have hspec :=
Classical.choose_spec (exists_lowerSemicontinuousHull (n := n) f)
have hle : lowerSemicontinuousHull f β€ f := by
simpa [lowerSemicontinuousHull] using hspec.2.1
simpa [convexFunctionClosure, hbot] using hle
Β· push_neg at hbot
have hcl :
convexFunctionClosure f = (fun _ => (β₯ : EReal)) :=
convexFunctionClosure_eq_bot_of_exists_bot (f := f) hbot
intro x
simp [hcl]The closure operator is monotone with respect to the pointwise order.
lemma convexFunctionClosure_mono {n : Nat} {f1 f2 : (Fin n β Real) β EReal}
(h12 : f1 β€ f2) : convexFunctionClosure f1 β€ convexFunctionClosure f2 := by
classical
by_cases hbot1 : β x, f1 x β (β₯ : EReal)
Β· have hbot2 : β x, f2 x β (β₯ : EReal) := by
intro x hx
have hle : f1 x β€ (β₯ : EReal) := by simpa [hx] using h12 x
have hbot1x : f1 x = (β₯ : EReal) := (le_bot_iff).1 hle
exact hbot1 x hbot1x
have hspec1 :=
Classical.choose_spec (exists_lowerSemicontinuousHull (n := n) f1)
have hspec2 :=
Classical.choose_spec (exists_lowerSemicontinuousHull (n := n) f2)
have hls1 : LowerSemicontinuous (lowerSemicontinuousHull f1) := by
simpa [lowerSemicontinuousHull] using hspec1.1
have hle1 : lowerSemicontinuousHull f1 β€ f1 := by
simpa [lowerSemicontinuousHull] using hspec1.2.1
have hle1' : lowerSemicontinuousHull f1 β€ f2 := by
intro x
exact le_trans (hle1 x) (h12 x)
have hle12 : lowerSemicontinuousHull f1 β€ lowerSemicontinuousHull f2 := by
have hmax2 :
β h : (Fin n β Real) β EReal, LowerSemicontinuous h β h β€ f2 β
h β€ lowerSemicontinuousHull f2 := by
intro h hlsc hle
simpa [lowerSemicontinuousHull] using hspec2.2.2 h hlsc hle
exact hmax2 _ hls1 hle1'
simpa [convexFunctionClosure, hbot1, hbot2] using hle12
Β· push_neg at hbot1
have hcl1 :
convexFunctionClosure f1 = (fun _ => (β₯ : EReal)) :=
convexFunctionClosure_eq_bot_of_exists_bot (f := f1) hbot1
intro x
simp [hcl1]The infimum of a function equals the infimum of its closure.
lemma iInf_convexFunctionClosure_eq {n : Nat} (f : (Fin n β Real) β EReal) :
iInf (fun x => f x) = iInf (fun x => convexFunctionClosure f x) := by
classical
by_cases hbot : β x, f x β (β₯ : EReal)
Β· have hspec :=
Classical.choose_spec (exists_lowerSemicontinuousHull (n := n) f)
have hmax :
β h : (Fin n β Real) β EReal, LowerSemicontinuous h β h β€ f β
h β€ lowerSemicontinuousHull f := by
intro h hlsc hle
simpa [lowerSemicontinuousHull] using hspec.2.2 h hlsc hle
have hconst_lsc :
LowerSemicontinuous
(fun _ : (Fin n β Real) => iInf (fun x => f x)) := by
simpa using
(lowerSemicontinuous_const :
LowerSemicontinuous (fun _ : (Fin n β Real) => iInf (fun x => f x)))
have hconst_le : (fun _ : (Fin n β Real) => iInf (fun x => f x)) β€ f := by
intro x
exact iInf_le (fun x => f x) x
have hconst_le_hull :
(fun _ : (Fin n β Real) => iInf (fun x => f x)) β€
lowerSemicontinuousHull f :=
hmax _ hconst_lsc hconst_le
have hle_closure : iInf (fun x => convexFunctionClosure f x) β€ iInf (fun x => f x) :=
iInf_mono (convexFunctionClosure_le_self (f := f))
have hle_inf : iInf (fun x => f x) β€ iInf (fun x => convexFunctionClosure f x) := by
refine le_iInf ?_
intro x
have hx : iInf (fun x => f x) β€ lowerSemicontinuousHull f x :=
hconst_le_hull x
simpa [convexFunctionClosure, hbot] using hx
exact le_antisymm hle_inf hle_closure
Β· push_neg at hbot
rcases hbot with β¨x, hxβ©
have hcl :
convexFunctionClosure f = (fun _ => (β₯ : EReal)) :=
convexFunctionClosure_eq_bot_of_exists_bot (f := f) β¨x, hxβ©
have hInf_le : iInf (fun x => f x) β€ (β₯ : EReal) := by
simpa [hx] using (iInf_le (fun x => f x) x)
have hInf_eq : iInf (fun x => f x) = (β₯ : EReal) :=
le_antisymm hInf_le bot_le
calc
iInf (fun x => f x) = (β₯ : EReal) := hInf_eq
_ = iInf (fun x => convexFunctionClosure f x) := by
simp [hcl]
Text 7.0.12: For any extended-real-valued function ,
one has cl f β€ f. Moreover, if fβ β€ fβ, then cl fβ β€ cl fβ.
In addition, . Here cl f
is convexFunctionClosure f.
theorem convexFunctionClosure_properties {n : Nat} :
(β f : (Fin n β Real) β EReal, convexFunctionClosure f β€ f) β§
(β f1 f2 : (Fin n β Real) β EReal, f1 β€ f2 β
convexFunctionClosure f1 β€ convexFunctionClosure f2) β§
(β f : (Fin n β Real) β EReal,
iInf (fun x => f x) = iInf (fun x => convexFunctionClosure f x)) := by
refine β¨?_, ?_, ?_β©
Β· intro f
exact convexFunctionClosure_le_self (f := f)
Β· intro f1 f2 h12
exact convexFunctionClosure_mono (f1 := f1) (f2 := f2) h12
Β· intro f
exact iInf_convexFunctionClosure_eq (f := f)Points with positive coordinate appear frequently near the origin.
lemma frequently_pos_coord_nhds_zero :
βαΆ y in π (0 : Fin 1 β Real), 0 < y 0 := by
have hclosure :
(0 : Fin 1 β Real) β closure {y : Fin 1 β Real | 0 < y 0} := by
refine (mem_closure_iff_seq_limit).2 ?_
refine β¨(fun n : β => fun _ : Fin 1 => (1 : Real) / ((n : Real) + 1)), ?_, ?_β©
Β· intro n
have hpos' : (0 : Real) < (n : Real) + 1 := by
have hnonneg : (0 : Real) β€ (n : Real) := by
exact_mod_cast (Nat.zero_le n)
linarith
have hpos : 0 < (1 : Real) / ((n : Real) + 1) := (one_div_pos).2 hpos'
simpa using hpos
Β· refine (tendsto_pi_nhds).2 ?_
intro i
fin_cases i
simpa using (tendsto_one_div_add_atTop_nhds_zero_nat (π := Real))
exact (mem_closure_iff_frequently).1 hclosure
At a point with positive coordinate, the liminf of the step function is 0.
lemma liminf_example_origin_pos {x : Fin 1 β Real} (hx : 0 < x 0) :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) = (0 : EReal) := by
have hopen : IsOpen {y : Fin 1 β Real | 0 < y 0} := by
simpa using (isOpen_lt (continuous_const) (continuous_apply 0))
have hmem : {y : Fin 1 β Real | 0 < y 0} β π x := by
exact hopen.mem_nhds hx
have hEq :
βαΆ y in π x,
(if 0 < y 0 then (0 : EReal) else (β€ : EReal)) = (0 : EReal) := by
refine Filter.mem_of_superset hmem ?_
intro y hy
simp [hy]
have hlim :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) =
Filter.liminf (fun _ : Fin 1 β Real => (0 : EReal)) (π x) :=
Filter.liminf_congr hEq
simp [hlim]
At a point with negative coordinate, the liminf of the step function is β€.
lemma liminf_example_origin_neg {x : Fin 1 β Real} (hx : x 0 < 0) :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) = (β€ : EReal) := by
have hopen : IsOpen {y : Fin 1 β Real | y 0 < 0} := by
simpa using (isOpen_lt (continuous_apply 0) (continuous_const))
have hmem : {y : Fin 1 β Real | y 0 < 0} β π x := by
exact hopen.mem_nhds hx
have hEq :
βαΆ y in π x,
(if 0 < y 0 then (0 : EReal) else (β€ : EReal)) = (β€ : EReal) := by
refine Filter.mem_of_superset hmem ?_
intro y hy
have hnot : Β¬ 0 < y 0 := by
exact not_lt_of_gt hy
change (if 0 < y 0 then (0 : EReal) else (β€ : EReal)) = (β€ : EReal)
simp [hnot]
have hlim :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) =
Filter.liminf (fun _ : Fin 1 β Real => (β€ : EReal)) (π x) :=
Filter.liminf_congr hEq
simp [hlim]
At the origin, the liminf of the step function is 0.
lemma liminf_example_origin_zero :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π (0 : Fin 1 β Real)) =
(0 : EReal) := by
have hle :
(0 : EReal) β€ Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π (0 : Fin 1 β Real)) := by
refine (Filter.le_liminf_of_le (f := π (0 : Fin 1 β Real)) (a := (0 : EReal))
(u := fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (h := ?_))
refine Filter.Eventually.of_forall ?_
intro y
by_cases hy : 0 < y 0 <;> simp [hy]
have hfreq_pos :
βαΆ y in π (0 : Fin 1 β Real), 0 < y 0 :=
frequently_pos_coord_nhds_zero
have hfreq :
βαΆ y in π (0 : Fin 1 β Real),
(if 0 < y 0 then (0 : EReal) else (β€ : EReal)) β€ (0 : EReal) := by
exact hfreq_pos.mono (fun y hy => by simp [hy])
have hge :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π (0 : Fin 1 β Real)) β€
(0 : EReal) :=
Filter.liminf_le_of_frequently_le (f := π (0 : Fin 1 β Real))
(u := fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal))
(b := (0 : EReal)) hfreq
exact le_antisymm hge hle
Text 7.0.13: If is defined by for x > 0 and
for x β€ 0, then cl f agrees with f except at the origin, where
rather than .
theorem convexFunctionClosure_example_origin :
convexFunctionClosure (fun x : Fin 1 β Real =>
if 0 < x 0 then (0 : EReal) else (β€ : EReal)) =
fun x => if x 0 < 0 then (β€ : EReal) else (0 : EReal) := by
classical
let f : (Fin 1 β Real) β EReal :=
fun x => if 0 < x 0 then (0 : EReal) else (β€ : EReal)
have hbot : β x, f x β (β₯ : EReal) := by
intro x
by_cases hx : 0 < x 0 <;> simp [f, hx]
have hliminf := (epigraph_convexFunctionClosure_eq_closure_epigraph (f := f) hbot).2
funext x
by_cases hxneg : x 0 < 0
Β· have hlim :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) = (β€ : EReal) :=
liminf_example_origin_neg (x := x) hxneg
simp [f, hxneg, hliminf x, hlim]
Β· by_cases hxpos : 0 < x 0
Β· have hlim :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) = (0 : EReal) :=
liminf_example_origin_pos (x := x) hxpos
simp [f, hxneg, hliminf x, hlim]
Β· have hxge : 0 β€ x 0 := le_of_not_gt hxneg
have hxle : x 0 β€ 0 := le_of_not_gt hxpos
have hxzero : x 0 = 0 := le_antisymm hxle hxge
have hx : x = 0 := by
ext i
fin_cases i
simp [hxzero]
have hlim :
Filter.liminf (fun y : Fin 1 β Real =>
if 0 < y 0 then (0 : EReal) else (β€ : EReal)) (π x) = (0 : EReal) := by
simpa [hx] using liminf_example_origin_zero
simp [f, hxneg, hliminf x, hlim]Points in the closure of the unit ball are frequently in the unit ball.
lemma frequently_mem_ball_of_mem_closure {x : Fin 2 β Real}
(hx : x β closure (Metric.ball (0 : Fin 2 β Real) 1)) :
βαΆ y in π x, y β Metric.ball (0 : Fin 2 β Real) 1 := by
simpa using (mem_closure_iff_frequently.1 hx)Points outside the closure of the unit ball have a neighborhood outside it.
lemma eventually_not_mem_closure_of_not_mem {x : Fin 2 β Real}
(hx : x β closure (Metric.ball (0 : Fin 2 β Real) 1)) :
βαΆ y in π x, y β closure (Metric.ball (0 : Fin 2 β Real) 1) := by
have hopen : IsOpen ((closure (Metric.ball (0 : Fin 2 β Real) 1))αΆ) :=
isClosed_closure.isOpen_compl
have hxmem : x β (closure (Metric.ball (0 : Fin 2 β Real) 1))αΆ := by
simpa using hx
have hmem : (closure (Metric.ball (0 : Fin 2 β Real) 1))αΆ β π x :=
hopen.mem_nhds hxmem
refine Filter.mem_of_superset hmem ?_
intro y hy
simpa using hy
On the closure of the unit ball, the liminf of f is 0.
lemma liminf_unitDisk_closure_eq_zero
(f : (Fin 2 β Real) β EReal)
(h0 : β x, x β Metric.ball (0 : Fin 2 β Real) 1 β f x = (0 : EReal))
(hnonneg : β x, (0 : EReal) β€ f x) {x : Fin 2 β Real}
(hx : x β closure (Metric.ball (0 : Fin 2 β Real) 1)) :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) = (0 : EReal) := by
have hle :
(0 : EReal) β€ Filter.liminf (fun y : Fin 2 β Real => f y) (π x) := by
refine (Filter.le_liminf_of_le (f := π x) (a := (0 : EReal))
(u := fun y : Fin 2 β Real => f y) (h := ?_))
exact Filter.Eventually.of_forall (fun y => hnonneg y)
have hfreq_mem :
βαΆ y in π x, y β Metric.ball (0 : Fin 2 β Real) 1 :=
frequently_mem_ball_of_mem_closure (x := x) hx
have hfreq :
βαΆ y in π x, f y β€ (0 : EReal) := by
refine hfreq_mem.mono ?_
intro y hy
have hfy : f y = (0 : EReal) := h0 y hy
simp [hfy]
have hge :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) β€ (0 : EReal) :=
Filter.liminf_le_of_frequently_le (f := π x)
(u := fun y : Fin 2 β Real => f y) (b := (0 : EReal)) hfreq
exact le_antisymm hge hle
Outside the closure of the unit ball, the liminf of f is β€.
lemma liminf_unitDisk_outside_eq_top
(f : (Fin 2 β Real) β EReal)
(hInf : β x, x β closure (Metric.ball (0 : Fin 2 β Real) 1) β
f x = (β€ : EReal)) {x : Fin 2 β Real}
(hx : x β closure (Metric.ball (0 : Fin 2 β Real) 1)) :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) = (β€ : EReal) := by
have hEq : βαΆ y in π x, f y = (β€ : EReal) := by
have hmem :
βαΆ y in π x, y β closure (Metric.ball (0 : Fin 2 β Real) 1) :=
eventually_not_mem_closure_of_not_mem (x := x) hx
refine hmem.mono ?_
intro y hy
simp [hInf y hy]
have hlim :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) =
Filter.liminf (fun _ : Fin 2 β Real => (β€ : EReal)) (π x) :=
Filter.liminf_congr hEq
simp [hlim]
Text 7.0.14: If C is the unit disk in β^2 and for x β C while
for x β C (with arbitrary boundary values), then for all
x β cl C and elsewhere.
theorem convexFunctionClosure_example_unitDisk
(f : (Fin 2 β Real) β EReal)
(h0 : β x, x β Metric.ball (0 : Fin 2 β Real) 1 β f x = (0 : EReal))
(hInf : β x, x β closure (Metric.ball (0 : Fin 2 β Real) 1) β f x = (β€ : EReal))
(hnonneg : β x, (0 : EReal) β€ f x) :
(β x, x β closure (Metric.ball (0 : Fin 2 β Real) 1) β
convexFunctionClosure f x = (0 : EReal)) β§
(β x, x β closure (Metric.ball (0 : Fin 2 β Real) 1) β
convexFunctionClosure f x = (β€ : EReal)) := by
classical
have hbot : β x, f x β (β₯ : EReal) := by
intro x hx
have hle : (0 : EReal) β€ (β₯ : EReal) := by
simpa [hx] using hnonneg x
have hzero : (0 : EReal) = (β₯ : EReal) := (le_bot_iff).1 hle
exact (EReal.zero_ne_bot hzero)
have hliminf := (epigraph_convexFunctionClosure_eq_closure_epigraph (f := f) hbot).2
refine β¨?_, ?_β©
Β· intro x hx
have hlim :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) = (0 : EReal) :=
liminf_unitDisk_closure_eq_zero (f := f) h0 hnonneg (x := x) hx
simp [hliminf x, hlim]
Β· intro x hx
have hlim :
Filter.liminf (fun y : Fin 2 β Real => f y) (π x) = (β€ : EReal) :=
liminf_unitDisk_outside_eq_top (f := f) hInf (x := x) hx
simp [hliminf x, hlim]end Section07end Chap02