Documentation

Tdaf.Order.EReal

Auxiliary lemmas about EReal #

Convex analysis over EReal needs a handful of order and arithmetic facts that Mathlib does not provide directly. They are collected here so that they do not accumulate as ad hoc haves throughout the library.

Rockafellar's arithmetic conventions #

Rockafellar (Convex Analysis, §4) fixes the conventions

and leaves ∞ - ∞ undefined, avoiding it by properness hypotheses. Every one of these agrees with the corresponding fact about EReal in Mathlib, so no bespoke arithmetic type is needed; see the examples below, which are exactly the conventions listed in the book.

theorem Tdaf.EReal.le_coe_of_forall_lt {z : EReal} {r : ℝ} (h : ∀ (q : ℝ), r < q → z < ↑q) :
z ≤ ↑r

If z is below every real number strictly above r, then z ≤ r. This is what turns Rockafellar's strict form of convexity (Theorem 4.2) back into the epigraph form.

theorem Tdaf.EReal.exists_real_btwn_of_lt_coe {z : EReal} {r : ℝ} (h : z < ↑r) :
∃ (q : ℝ), z < ↑q ∧ q < r

A value strictly below a real number is bounded by some real number strictly below it.

theorem Tdaf.EReal.coe_mul_coe (a r : ℝ) :
↑a * ↑r = ↑(a * r)

Multiplication by a positive real coefficient, in the form used by convexity arguments.

theorem Tdaf.EReal.eq_bot_of_forall_le_coe {z : EReal} (h : ∀ (r : ℝ), z ≤ ↑r) :
z = ⊥

If z is below every real number, then z = ⊥.

theorem Tdaf.EReal.exists_coe_of_ne_bot_of_lt_top {z : EReal} (h₁ : z ≠ ⊥) (h₂ : z < ⊤) :
∃ (r : ℝ), z = ↑r

An EReal that is neither ⊥ nor ⊤ is a real number.

theorem Tdaf.EReal.neg_add_of_ne_top {u v : EReal} (hu : u ≠ ⊤) (hv : v ≠ ⊤) :
-(u + v) = -u + -v

Negation distributes over an EReal sum as soon as neither summand is ⊤, so that the forbidden ∞ - ∞ cannot arise. Mathlib's EReal.neg_add has the sharpest hypotheses; this is the symmetric special case that concave/convex sign transfer actually uses.

theorem Tdaf.EReal.coe_mul_ne_top {a : ℝ} (ha : 0 < a) {u : EReal} (hu : u ≠ ⊤) :
↑a * u ≠ ⊤

A positive real multiple of an EReal below ⊤ stays below ⊤.

theorem Tdaf.EReal.neg_combo {a b : ℝ} (ha : 0 < a) (hb : 0 < b) {u v : EReal} (hu : u ≠ ⊤) (hv : v ≠ ⊤) :
↑a * -u + ↑b * -v = -(↑a * u + ↑b * v)

Negation turns a convex combination with positive real coefficients into the combination of the negations — provided neither value is ⊤, without which the identity is false on EReal.

The hypotheses of Tdaf.EReal.neg_combo are load-bearing: at u = ⊤, v = ⊥ the two sides are ⊥ and ⊤.

theorem Tdaf.EReal.coe_mul_le_coe_mul_iff {a : ℝ} (ha : 0 < a) {z w : EReal} :
↑a * z ≤ ↑a * w ↔ z ≤ w

Multiplication by a positive real scalar reflects, as well as preserves, the order on EReal. The reflection direction is proved by multiplying by the inverse scalar, since EReal has PosMulMono but not PosMulStrictMono.

theorem Tdaf.EReal.le_zero_of_forall_le_pos {z : EReal} (h : ∀ (ε : ℝ), 0 < ε → z ≤ ↑ε) :
z ≤ 0

If z is at most every positive real, then z ≤ 0. The conclusion is genuinely weaker than z ≤ r for a fixed r: z may be any non-positive extended real. It is how "the optimal value is not positive" is extracted from feasible solutions whose values tend to 0.

theorem Tdaf.EReal.coe_mul_add_coe {l : ℝ} (hl : 0 < l) (a : EReal) (c : ℝ) :
↑l * (a + ↑c) = ↑l * a + ↑(l * c)

A positive real factor distributes over a sum whose right summand is real. No side condition beyond 0 < l is needed: l * ⊤ = ⊤ and l * ⊥ = ⊥ for l > 0, and a real summand can cancel neither.

theorem Tdaf.EReal.coe_mul_add_coe_le_coe_mul_iff {c : ℝ} (hc : 0 < c) (A B : EReal) (t : ℝ) :
↑c * A + ↑(c * t) ≤ ↑c * B ↔ A + ↑t ≤ B

Scaling an inequality that carries a real offset, cA + ct ≤ cB ↔ A + t ≤ B for c > 0.

This is what a positive Lagrange multiplier does to a constraint.

theorem Tdaf.EReal.eq_of_forall_le_coe_iff {z w : EReal} (h : ∀ (r : ℝ), z ≤ ↑r ↔ w ≤ ↑r) :
z = w

An extended real is determined by the real numbers that bound it above.

theorem Tdaf.EReal.eq_zero_or_eq_top_or_eq_bot {a : ℝ} (ha : a ≠ 1) {z : EReal} (h : ↑a * z = z) :
z = 0 ∨ z = ⊤ ∨ z = ⊥

The only extended reals fixed by multiplication by a positive scalar other than 1 are 0, ⊤ and ⊥. This is the whole content of "positive homogeneity says nothing about f 0".

theorem Tdaf.EReal.eq_zero_of_neg_eq {z : EReal} (h : -z = z) :
z = 0

An extended real equal to its own negative is 0.

theorem Tdaf.EReal.neg_le_of_zero_le_add {u v : EReal} (hu : u ≠ ⊥) (h : 0 ≤ u + v) :
-u ≤ v

Transposing a term across 0 ≤ u + v, when u is not ⊥.

theorem Tdaf.EReal.sum_ne_bot {ι : Type u_1} {s : Finset ι} {g : ι → EReal} (h : ∀ i ∈ s, g i ≠ ⊥) :
∑ i ∈ s, g i ≠ ⊥

A finite sum of EReals none of which is ⊥ is not ⊥.

theorem Tdaf.EReal.coe_mul_le_coe_iff {a : ℝ} (ha : 0 < a) {z : EReal} {r : ℝ} :
↑a * z ≤ ↑r ↔ z ≤ ↑(r / a)

Dividing through by a positive real coefficient. This is the form in which a hypothesis (a : EReal) * z ≤ r gets used: it turns a statement about a • f into one about f.

theorem Tdaf.EReal.coe_le_coe_mul_iff {a : ℝ} (ha : 0 < a) {z : EReal} {r : ℝ} :
↑r ≤ ↑a * z ↔ ↑(r / a) ≤ z

The mirror of Tdaf.EReal.coe_mul_le_coe_iff: dividing through a lower bound by a positive real.

theorem Tdaf.EReal.coe_sum {κ : Type u_1} (t : Finset κ) (r : κ → ℝ) :
↑(∑ i ∈ t, r i) = ∑ i ∈ t, ↑(r i)

The coercion ℝ → EReal commutes with finite sums.

theorem Tdaf.EReal.coe_mul_ne_bot {a : ℝ} (ha : 0 ≤ a) {z : EReal} (hz : z ≠ ⊥) :
↑a * z ≠ ⊥

A non-negative real multiple of an EReal other than ⊥ is not ⊥. The coefficient 0 is harmless because EReal obeys Rockafellar's convention 0 · ∞ = 0.

theorem Tdaf.EReal.forall_ne_top_of_sum_ne_top {κ : Type u_1} (t : Finset κ) (z : κ → EReal) :
(∀ i ∈ t, z i ≠ ⊥) → ∑ i ∈ t, z i ≠ ⊤ → ∀ i ∈ t, z i ≠ ⊤

If a finite sum of EReals none of which is ⊥ is not ⊤, then no term is ⊤. This is the form in which "the sum is unambiguous" gets used: it turns a finite bound on a sum into a finite bound on each term.

theorem Tdaf.EReal.coe_sub_eq_bot_iff {a : ℝ} {z : EReal} :
↑a - z = ⊥ ↔ z = ⊤

a - z is ⊥ exactly when z is ⊤, for a real a.

theorem Tdaf.EReal.add_coe_le_coe_iff {z : EReal} {c m : ℝ} :
z + ↑c ≤ ↑m ↔ z ≤ ↑(m - c)

Moving a real summand across an inequality against a real coercion.

theorem Tdaf.EReal.coe_sub_ne_bot {a : ℝ} {z : EReal} (h : z ≠ ⊤) :
↑a - z ≠ ⊥

Subtracting a value below ⊤ from a real number cannot give ⊥.

theorem Tdaf.EReal.coe_sub_le_comm {a : ℝ} {z w : EReal} :
↑a - z ≤ w ↔ ↑a - w ≤ z

The symmetry of Fenchel's inequality, and the single EReal fact that carries the whole of §12: a - z ≤ w ↔ a - w ≤ z whenever a is a real number. There is no side condition: all eight degenerate combinations of ⊥ and ⊤ work out, because a is finite.

theorem Tdaf.EReal.le_coe_sub_comm {a : ℝ} {z w : EReal} :
z ≤ ↑a - w ↔ w ≤ ↑a - z

The mirror of Tdaf.EReal.coe_sub_le_comm, for the concave side of the theory: z ≤ a - w ↔ w ≤ a - z whenever a is a real number. It says that z ↦ a - z is an antitone involution of EReal, and, like its convex counterpart, it carries no side condition.

theorem Tdaf.EReal.coe_sub_coe_sub (a b : ℝ) (z : EReal) :
↑b - (↑a - z) = ↑(b - a) + z

Reflecting an EReal in two real numbers: b - (a - z) = (b - a) + z. In particular a - (a - z) = z, so z ↦ a - z is an involution of EReal for every real a.

theorem Tdaf.EReal.le_of_forall_coe_le {u v : EReal} (h : ∀ (s : ℝ), v ≤ ↑s → u ≤ ↑s) :
u ≤ v

To bound an EReal by another it suffices to bound it by the reals above the latter.

theorem Tdaf.EReal.coe_mul_iInf {ι : Sort u_2} {a : ℝ} (ha : 0 < a) (g : ι → EReal) :
↑a * ⨅ (i : ι), g i = ⨅ (i : ι), ↑a * g i

Multiplication by a positive real commutes with an infimum. EReal has PosMulMono but no PosMulStrictMono, so the reverse inequality goes through a⁻¹.

theorem Tdaf.EReal.sub_div_le_coe_iff {r m a : ℝ} (ha : 0 < a) (u : EReal) :
(u - ↑r) / ↑a ≤ ↑m ↔ u ≤ ↑(r + m * a)

The difference quotient (u - r) / a bounded above by a real, for a > 0.

theorem Tdaf.EReal.coe_le_sub_div_iff {r m a : ℝ} (ha : 0 < a) (u : EReal) :
↑m ≤ (u - ↑r) / ↑a ↔ ↑(r + m * a) ≤ u

The difference quotient (u - r) / a bounded below by a real, for a > 0.

theorem Tdaf.EReal.neg_iSup {ι : Sort u_2} (u : ι → EReal) :
-⨆ (i : ι), u i = ⨅ (i : ι), -u i

Negation exchanges suprema and infima. Unlike addition, negation is an order-reversing involution of EReal with no exceptional values, so this needs no hypothesis. It is what turns every statement about conj into one about concaveConj.

theorem Tdaf.EReal.neg_iInf {ι : Sort u_2} (u : ι → EReal) :
-⨅ (i : ι), u i = ⨆ (i : ι), -u i

The companion of Tdaf.EReal.neg_iSup.

theorem Tdaf.EReal.neg_coe_sub (r : ℝ) (z : EReal) :
-(↑r - z) = z - ↑r

Negating a difference whose minuend is a real number turns it around, with no side condition: the finite term rules out both ∞ - ∞ collisions by itself, where the unrestricted EReal.neg_sub needs two hypotheses.

theorem Tdaf.EReal.neg_sub_comm {a b : EReal} (ha : a ≠ ⊥) (hb : b ≠ ⊤) :
-(a - b) = b - a

Negation turns a difference around, provided neither of the two ∞ - ∞ collisions occurs. EReal.neg_sub's hypotheses are a disjunction each; this and neg_sub_comm' are the two ways of satisfying them. neg_coe_sub above is the case where a finite minuend satisfies both at once.

theorem Tdaf.EReal.neg_sub_comm' {a b : EReal} (ha : a ≠ ⊤) (hb : b ≠ ⊥) :
-(a - b) = b - a

The companion of neg_sub_comm with the other pair of side conditions.

theorem Tdaf.EReal.coe_mul_iSup {a : ℝ} (ha : 0 < a) {ι : Sort u_2} (u : ι → EReal) :
↑a * ⨆ (i : ι), u i = ⨆ (i : ι), ↑a * u i

A positive real scalar commutes with a supremum.

theorem Tdaf.EReal.iSup_add_coe {ι : Sort u_2} (u : ι → EReal) (r : ℝ) :
(⨆ (i : ι), u i) + ↑r = ⨆ (i : ι), u i + ↑r

A real constant may be moved in and out of a supremum. Because it is finite no ∞ - ∞ arises, so there is no hypothesis; the empty index set works too, since ⊥ + r = ⊥.

theorem Tdaf.EReal.iSup_sub_of_ne_bot {ι : Sort u_2} (u : ι → EReal) {c : EReal} (hc : c ≠ ⊥) :
(⨆ (i : ι), u i) - c = ⨆ (i : ι), u i - c

A constant that is not -∞ slides out of a supremum as a subtrahend. The hypothesis rules out the disagreement at c = ⊥: there (⨆ i, u i) - ⊥ is ⊤ as soon as the supremum is not ⊥, while u i - ⊥ is ⊤ only where u i ≠ ⊥. Over an empty index set both sides are ⊥.

theorem Tdaf.EReal.iInf_add_coe {ι : Sort u_2} (u : ι → EReal) (r : ℝ) :
(⨅ (i : ι), u i) + ↑r = ⨅ (i : ι), u i + ↑r

The dual of Tdaf.EReal.iSup_add_coe, and like it hypothesis-free: the empty index set works too, since ⊤ + r = ⊤.

theorem Tdaf.EReal.biSup_add_coe {α : Type u_2} (s : Set α) (u : α → EReal) (r : ℝ) :
(⨆ a ∈ s, u a) + ↑r = ⨆ a ∈ s, u a + ↑r

The set-indexed form of Tdaf.EReal.iSup_add_coe.

theorem Tdaf.EReal.add_coe_right_cancel {u v : EReal} {r : ℝ} (h : u + ↑r = v + ↑r) :
u = v

A real summand cancels from the right, with no hypothesis: r is finite, so u + r - r = u for every u : EReal.

theorem Tdaf.EReal.biInf_add_coe {α : Type u_2} (s : Set α) (u : α → EReal) (r : ℝ) :
(⨅ a ∈ s, u a) + ↑r = ⨅ a ∈ s, u a + ↑r

The set-indexed form of Tdaf.EReal.iInf_add_coe.

theorem Tdaf.EReal.biSup_add_of_ne_bot {α : Type u_2} {s : Set α} {u : α → EReal} (hu : ∀ a ∈ s, u a ≠ ⊥) (M : EReal) :
(⨆ a ∈ s, u a) + M = ⨆ a ∈ s, u a + M

An arbitrary constant may be moved in and out of a supremum over a set on which the values are never ⊥. The hypothesis is what rules out ⊥ + ⊤ = ⊥ disagreeing with ⨆ (⊥ + ⊤).

theorem Tdaf.EReal.biSup_add_biSup {α : Type u_2} {β : Type u_3} {s : Set α} {t : Set β} {u : α → EReal} {v : β → EReal} (hu : ∀ a ∈ s, u a ≠ ⊥) (hv : ∀ b ∈ t, v b ≠ ⊥) :
(⨆ a ∈ s, u a) + ⨆ b ∈ t, v b = ⨆ a ∈ s, ⨆ b ∈ t, u a + v b

The supremum of a sum splits, provided neither family takes ⊥; if either index set is empty both sides are ⊥. This is what turns "the epigraph of an infimal convolution is a sum of epigraphs" into "the conjugate of an infimal convolution is a sum of conjugates" (Theorem 16.4).

theorem Tdaf.EReal.coe_add_iInf {ι : Sort u_2} (r : ℝ) (u : ι → EReal) :
↑r + ⨅ (i : ι), u i = ⨅ (i : ι), ↑r + u i

A real constant may be moved in and out of an infimum from the left. The mirror of Tdaf.EReal.iInf_add_coe, which has it on the right.

theorem Tdaf.EReal.coe_sub_iInf {ι : Sort u_2} (r : ℝ) (u : ι → EReal) :
↑r - ⨅ (i : ι), u i = ⨆ (i : ι), ↑r - u i

A real constant subtracted from an infimum turns it into a supremum.

theorem Tdaf.EReal.add_iInf_of_ne_bot {ι : Sort u_2} [Nonempty ι] (a : EReal) (u : ι → EReal) (hu : ⨅ (i : ι), u i ≠ ⊥) :
a + ⨅ (i : ι), u i = ⨅ (i : ι), a + u i

An arbitrary constant may be moved in and out of an infimum whose value is not ⊥. Note where the hypothesis sits: for suprema (Tdaf.EReal.biSup_add_of_ne_bot) it is the values that must avoid ⊥; here it is the infimum itself.

theorem Tdaf.EReal.iInf_add_of_ne_bot {ι : Sort u_2} [Nonempty ι] (u : ι → EReal) (hu : ⨅ (i : ι), u i ≠ ⊥) (c : EReal) :
(⨅ (i : ι), u i) + c = ⨅ (i : ι), u i + c

The mirror of Tdaf.EReal.add_iInf_of_ne_bot, with the constant on the right.

theorem Tdaf.EReal.iInf_add_eq_bot {ι : Sort u_2} [Nonempty ι] {u : ι → EReal} (hu : ⨅ (i : ι), u i = ⊥) {c : EReal} (hc : c ≠ ⊤) :
⨅ (i : ι), u i + c = ⊥

An infimum of ⊥ survives adding any constant but ⊤.

theorem Tdaf.EReal.iInf_add_iInf_of_ne_bot {ι : Sort u_2} {κ : Sort u_3} [Nonempty ι] [Nonempty κ] (u : ι → EReal) (v : κ → EReal) (hu : ⨅ (i : ι), u i ≠ ⊥) (hv : ⨅ (j : κ), v j ≠ ⊥) :
(⨅ (i : ι), u i) + ⨅ (j : κ), v j = ⨅ (i : ι), ⨅ (j : κ), u i + v j

The infimum of a sum splits, provided neither infimum is ⊥. The infimal mirror of Tdaf.EReal.biSup_add_biSup, but with a different hypothesis: for suprema it is the values that must avoid ⊥, here it is the two infima themselves.

theorem Tdaf.EReal.iInf_prod_add {α : Type u_2} {β : Type u_3} [Nonempty α] [Nonempty β] (ψ : α → EReal) (φ : β → EReal) (hψ : ⨅ (a : α), ψ a ≠ ⊤) (hφ : ⨅ (b : β), φ b ≠ ⊤) :
⨅ (p : α × β), ψ p.1 + φ p.2 = (⨅ (a : α), ψ a) + ⨅ (b : β), φ b

An infimum over a product of a separated sum splits, under the single hypothesis that neither infimum is ⊤. Unlike Tdaf.EReal.iInf_add_iInf_of_ne_bot, the ⊥ cases are handled rather than excluded: when one infimum is ⊥ the other being below ⊤ forces both sides to ⊥. Some hypothesis is necessary — for ψ i = -i on ℕ and φ ≡ ⊤ the sides are ⊤ and ⊥.

theorem Tdaf.EReal.coe_add_sub (p q : ℝ) (u : EReal) :
↑(p + q) - u = ↑p - u + ↑q

A real summand slides out of a difference. (p + q) - u = (p - u) + q for real p, q and arbitrary u : EReal.

theorem Tdaf.EReal.coe_sub_add_coe (p q : ℝ) (u : EReal) :
↑p - (u + ↑q) = ↑(p - q) - u

A real summand slides out of the subtrahend. p - (u + q) = (p - q) - u for real p, q and arbitrary u : EReal. Both are finite, so no ∞ - ∞ collision arises: at u = ⊤ both sides are ⊥ and at u = ⊥ both sides are ⊤.

theorem Tdaf.EReal.coe_sub_add_coe' (p q : ℝ) (u : EReal) :
↑p - (u + ↑q) = ↑p - u + ↑(-q)

The same difference, folded the other way: p - (u + q) = (p - u) + (-q). The unprimed form collects both reals on the left; this one keeps p - u intact. Interderivable, but a rw matches one and not the other.

theorem Tdaf.EReal.coe_mul_sub_add_coe_mul_sub {c : ℝ} (hc : 0 < c) {u v : EReal} (hu : u ≠ ⊥) (hv : v ≠ ⊥) (p q : ℝ) :
↑c * (u - ↑p) + ↑c * (v - ↑q) = ↑c * (u + v - ↑(p + q))

The difference quotient of a sum splits. For c > 0, reals p, q and u, v never ⊥, c * (u - p) + c * (v - q) = c * ((u + v) - (p + q)). This is the EReal arithmetic behind the recession-function half of Rockafellar's Theorem 9.3: the difference quotients defining f0⁺ and g0⁺ add up to the one defining (f + g)0⁺.

theorem Tdaf.EReal.le_coe_of_add_le_coe_add {p q : ℝ} {u v : EReal} (hp : ↑p ≤ u) (hq : ↑q ≤ v) (h : u + v ≤ ↑(p + q)) :
u ≤ ↑p

Two slack inequalities cannot compensate each other. If u and v are bounded below by reals p and q, and their sum is bounded above by p + q, then each is pinned to its own bound. Stated one-sided; apply it again with add_comm for the other summand. Rockafellar's Theorem 23.8 is where it is needed: the exact-sum hypothesis delivers one joint equality in Fenchel's inequality, and this splits it into y₁ ∈ ∂f x and y₂ ∈ ∂g x.

theorem Tdaf.EReal.le_coe_of_sum_le_coe_sum {ι : Type u_2} {s : Finset ι} {c : ι → ℝ} {u : ι → EReal} (hle : ∀ i ∈ s, ↑(c i) ≤ u i) (hsum : ∑ i ∈ s, u i ≤ ↑(∑ i ∈ s, c i)) {j : ι} (hj : j ∈ s) :
u j ≤ ↑(c j)

The m-ary form of Tdaf.EReal.le_coe_of_add_le_coe_add. If each u i is bounded below by the real c i and the sum of the u i is bounded above by the sum of the c i, then every one of the m inequalities is tight. The two-summand version does not iterate — there is no subtraction on EReal to peel a summand off with — so the proof splits s as {j} ∪ s.erase j and applies it once, with the two partial sums as the second pair.