Convex Analysis (Rockafellar, 1970) -- Chapter 02 -- Section 08 -- Part 3

noncomputable sectionopen scoped RealInnerProductSpaceopen scoped Pointwise Topologyopen Metricsection Chap02section Section08

If every Unknown identifier `x`sorry โˆˆ sorry : Propx โˆˆ Unknown identifier `C`C satisfies Unknown identifier `x`sorry + sorry โˆˆ sorry : Propx + Unknown identifier `y`y โˆˆ Unknown identifier `C`C, then the translation of Unknown identifier `C`C by Unknown identifier `y`y stays in Unknown identifier `C`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 Unknown identifier `x`sorry โˆˆ sorry : Propx โˆˆ Unknown identifier `C`C satisfies Unknown identifier `x`sorry - sorry โˆˆ sorry : Propx - Unknown identifier `y`y โˆˆ Unknown identifier `C`C, then Unknown identifier `C`C is contained in its translation by Unknown identifier `y`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 Unknown identifier `C`C is invariant under translation by Unknown identifier `y`y, then Unknown identifier `C`C is closed under adding Unknown identifier `y`y and -sorry : โ„ค-Unknown identifier `y`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 Unknown identifier `C`C, the lineality space equals failed to synthesize Membership ?m.1 Type Hint: Additional diagnostic information may be available using the `set_option diagnostics true` command.{y | sorry โˆง sorry + y = sorry} : Set ?m.17{ y โˆˆ โ„^Unknown identifier `n`n | Unknown identifier `C`C + y = Unknown identifier `C`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 Unknown identifier `C`C be a non-empty convex set with lineality space . The rank of Unknown identifier `C`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 Unknown identifier `f0_plus`sorry = 0 : Propf0_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 Unknown identifier `f0_plus`f0_plus from taking the value โŠฅ : ?m.1โŠฅ.

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 hsup

The 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.{u} {ฮฑ : Type u} : Set ฮฑ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 Unknown identifier `y`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 : TypeEReal 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 Unknown identifier `f0_plus`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 hstep

Subadditivity 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.{u} {ฮฑ : Type u} : Set ฮฑ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 hconv

Along 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.{u, v} {ฮฑ : Type u} {ฮน : Sort v} [SupSet ฮฑ] (s : ฮน โ†’ ฮฑ) : ฮฑ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 Unknown identifier `f`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 Unknown identifier `f`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_C

The 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 Unknown identifier `f`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 Unknown identifier `f0_plus`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