Documentation

Books.ConvexAnalysis_Rockafellar_1970.Chapters.Chap01.section04_part3

theorem ereal_bot_mul_add_of_no_forbidden {x1 x2 : EReal} (h : ¬ERealForbiddenSum ( * x1) ( * x2)) :
* (x1 + x2) = * x1 + * x2

Left distributivity for multiplication by under a non-forbidden sum.

theorem ereal_mul_add_of_no_forbidden {α x1 x2 : EReal} ( : ¬ERealForbiddenSum (α * x1) (α * x2)) :
α * (x1 + x2) = α * x1 + α * x2

Left distributivity under a non-forbidden sum.

theorem ereal_arithmetic_laws_of_no_forbidden {x1 x2 x3 α : EReal} (_h12 : ¬ERealForbiddenSum x1 x2) (_h23 : ¬ERealForbiddenSum x2 x3) (_h123 : ¬ERealForbiddenSum (x1 + x2) x3) (_h123' : ¬ERealForbiddenSum x1 (x2 + x3)) ( : ¬ERealForbiddenSum (α * x1) (α * x2)) :
x1 + x2 = x2 + x1 x1 + x2 + x3 = x1 + (x2 + x3) x1 * x2 = x2 * x1 x1 * x2 * x3 = x1 * (x2 * x3) α * (x1 + x2) = α * x1 + α * x2

Defintion 4.4.6: Under these conventions, the usual arithmetic laws remain valid as long as none of the indicated binary sums is forbidden.

def ConvexFunction {n : } (f : (Fin n)EReal) :

Remark 4.4.7: In this book, a “convex function” means an EReal-valued convex function defined on all of ℝ^n, unless otherwise specified; this convention lets the effective domain be determined implicitly by where f x is or is not .

Equations
Instances For
    theorem inner_add_const_combo_eq {n : } (a : Fin n) (α t : ) (x y : Fin n) :
    ↑(i : Fin n, ((1 - t) x + t y) i * a i + α) = ↑(1 - t) * ↑(i : Fin n, x i * a i + α) + t * ↑(i : Fin n, y i * a i + α)

    Convex combinations preserve linear-plus-constant forms.

    theorem affineFunctionOn_univ_inner_add_const {n : } (a : Fin n) (α : ) :
    AffineFunctionOn Set.univ fun (x : Fin n) => ↑(i : Fin n, x i * a i + α)
    theorem affineFunctionOn_univ_eq_combo {n : } {f : (Fin n)EReal} (hf : AffineFunctionOn Set.univ f) (x y : Fin n) (t : ) :
    0 tt 1f ((1 - t) x + t y) = ↑(1 - t) * f x + t * f y

    Affine functions on Set.univ agree with convex combinations.

    theorem affineFunctionOn_univ_toReal_linearMap {n : } {f : (Fin n)EReal} (hf : AffineFunctionOn Set.univ f) :
    ∃ (A : (Fin n) →ₗ[] ), ∀ (x : Fin n), (f x).toReal = A x + (f 0).toReal

    Subtracting the value at 0 gives a linear map for an affine function.

    theorem linearMap_apply_eq_sum_mul_basis {n : } (A : (Fin n) →ₗ[] ) (x : Fin n) :
    A x = i : Fin n, x i * A fun (j : Fin n) => if j = i then 1 else 0

    A linear functional on Fin n → ℝ is determined by its values on the standard basis.

    theorem affineFunctionOn_univ_exists_inner_add_const {n : } {f : (Fin n)EReal} (hf : AffineFunctionOn Set.univ f) :
    ∃ (a : Fin n) (α : ), ∀ (x : Fin n), f x = ↑(i : Fin n, x i * a i + α)

    Remark 4.5.0: Every affine function on ℝ^n is of the form x ↦ ⟪x, a⟫ + α for some a ∈ ℝ^n and α ∈ ℝ (Theorem 1.5).

    noncomputable def functionDimension {n : } (S : Set (Fin n)) (f : (Fin n)EReal) :

    Definition 4.5: The dimension of the effective domain of f is called the dimension of f.

    Equations
    Instances For
      theorem epigraph_mem_of_le {n : } {S : Set (Fin n)} {f : (Fin n)EReal} {x : Fin n} {μ : } (hx : x S) ( : f x μ) :
      (x, μ) epigraph S f

      If x ∈ S and f x ≤ μ, then (x, μ) is in the epigraph.

      theorem convex_combo_mem_epigraph {n : } {S : Set (Fin n)} {f : (Fin n)EReal} {x y : Fin n} {μ v t : } (hconv : Convex (epigraph S f)) (hx : (x, μ) epigraph S f) (hy : (y, v) epigraph S f) (ht0 : 0 t) (ht1 : t 1) :
      (1 - t) (x, μ) + t (y, v) epigraph S f

      Convexity of the epigraph yields convex combinations of points in it.

      theorem epigraph_combo_proj {n : } {S : Set (Fin n)} {f : (Fin n)EReal} {x y : Fin n} {μ v t : } :
      (1 - t) (x, μ) + t (y, v) epigraph S f → (1 - t) x + t y S f ((1 - t) x + t y) ↑((1 - t) * μ + t * v)

      Unpack epigraph membership of a convex combination.

      theorem convexFunctionOn_epigraph_condition {n : } {S : Set (Fin n)} {f : (Fin n)EReal} (hf : ConvexFunctionOn S f) (x : Fin n) :
      x SyS, ∀ (μ v : ), f x μf y v∀ (t : ), 0 tt 1 → (1 - t) x + t y S f ((1 - t) x + t y) ↑((1 - t) * μ + t * v)

      Remark 4.5.1: For convexity of the epigraph, one requires that for any x, y ∈ S, any μ, v ∈ ℝ with f x ≤ μ and f y ≤ v, and any 0 ≤ λ ≤ 1, the point (1 - λ) x + λ y lies in S and satisfies f ((1 - λ) x + λ y) ≤ (1 - λ) μ + λ v; this condition admits several equivalent formulations.

      theorem quadratic_combo_expansion {n : } {Q : Matrix (Fin n) (Fin n) } (x y : Fin n) (t u : ) :
      (t x + u y) ⬝ᵥ Q.mulVec (t x + u y) = t ^ 2 * x ⬝ᵥ Q.mulVec x + u ^ 2 * y ⬝ᵥ Q.mulVec y + t * u * (x ⬝ᵥ Q.mulVec y + y ⬝ᵥ Q.mulVec x)

      Expansion of the quadratic form on a linear combination.

      theorem quadratic_sub_cross {n : } {Q : Matrix (Fin n) (Fin n) } (x y : Fin n) :
      (x - y) ⬝ᵥ Q.mulVec (x - y) = x ⬝ᵥ Q.mulVec x + y ⬝ᵥ Q.mulVec y - (x ⬝ᵥ Q.mulVec y + y ⬝ᵥ Q.mulVec x)

      Quadratic form of a difference expressed via cross terms.

      theorem convexity_implies_quadratic_nonneg {n : } {Q : Matrix (Fin n) (Fin n) } {a : Fin n} {α : } (hconv : ConvexOn Set.univ fun (x : Fin n) => 1 / 2 * x ⬝ᵥ Q.mulVec x + x ⬝ᵥ a + α) (x : Fin n) :
      0 x ⬝ᵥ Q.mulVec x

      Convexity of the quadratic function forces its quadratic form to be nonnegative.

      theorem posSemidef_implies_convexity_quadratic {n : } {Q : Matrix (Fin n) (Fin n) } {a : Fin n} {α : } (hpos : Q.PosSemidef) :
      ConvexOn Set.univ fun (x : Fin n) => 1 / 2 * x ⬝ᵥ Q.mulVec x + x ⬝ᵥ a + α

      Positive semidefinite quadratic form yields convexity of the quadratic function.

      theorem convexOn_quadratic_iff_posSemidef {n : } {Q : Matrix (Fin n) (Fin n) } {a : Fin n} {α : } (hQ : Q.IsSymm) :
      (ConvexOn Set.univ fun (x : Fin n) => 1 / 2 * x ⬝ᵥ Q.mulVec x + x ⬝ᵥ a + α) Q.PosSemidef

      Remark 4.5.1: A quadratic function f x = (1/2) ⟪x, Q x⟫ + ⟪x, a⟫ + α, where Q is a symmetric n × n matrix, is convex on ℝ^n iff Q is positive semidefinite, i.e. ⟪z, Q z⟫ ≥ 0 for every z ∈ ℝ^n.

      theorem sum_sq_le_n_mul_sum_sq {n : } (u : Fin n) :
      Finset.univ.sum u ^ 2 n * i : Fin n, u i ^ 2

      Cauchy-Schwarz for Fin n: the square of the sum is bounded by n times the sum of squares.

      theorem closure_posOrthant_eq_nonneg {n : } :
      closure {x : Fin n | ∀ (i : Fin n), 0 < x i} = {x : Fin n | ∀ (i : Fin n), 0 x i}

      The closure of the positive orthant is the nonnegative orthant.

      theorem isOpen_posOrthant {n : } :
      IsOpen {x : Fin n | ∀ (i : Fin n), 0 < x i}

      The positive orthant is open.

      theorem convex_posOrthant {n : } :
      Convex {x : Fin n | ∀ (i : Fin n), 0 < x i}

      The positive orthant is convex.

      theorem contDiffOn_prod_coord {n : } {C : Set (Fin n)} :
      ContDiffOn 2 (fun (x : Fin n) => i : Fin n, x i) C

      The coordinate product is C^2 on any set.

      theorem prod_ne_zero_of_pos {n : } {x : Fin n} (hx : ∀ (i : Fin n), 0 < x i) :
      i : Fin n, x i 0

      The coordinate product is nonzero on the positive orthant.

      theorem contDiffOn_negGeomMean_pos {n : } :
      ContDiffOn 2 (fun (x : Fin n) => -(∏ i : Fin n, x i).rpow (1 / n)) {x : Fin n | ∀ (i : Fin n), 0 < x i}

      The negative geometric mean is C^2 on the positive orthant.

      theorem prod_erase_erase_eq_div {n : } (x : Fin n) (hx : ∀ (i : Fin n), x i 0) {i j : Fin n} (hj : j Finset.univ.erase i) :
      k(Finset.univ.erase i).erase j, x k = (∏ k : Fin n, x k) / x i / x j

      Product over Finset.univ with two entries removed.

      theorem sum_erase_mul_sum_eq_sum_sq_sub_sum_sq {n : } (u : Fin n) :
      i : Fin n, jFinset.univ.erase i, u i * u j = Finset.univ.sum u ^ 2 - i : Fin n, u i ^ 2

      Off-diagonal double sum identity.