Documentation

Books.ConvexAnalysis_Rockafellar_1970.Chapters.Chap01.section02_part1

def IsConvexSet (n : ) (C : Set (Fin n)) :

Definition 2.0.1. A subset C of Real^n is convex if (1 - λ) • x + λ • y ∈ C whenever x ∈ C, y ∈ C, and 0 < λ < 1.

Equations
Instances For
    theorem isConvexSet_imp_convex (n : ) (C : Set (Fin n)) :

    Convert the book's strict-parameter definition to mathlib's Convex.

    theorem convex_imp_isConvexSet (n : ) (C : Set (Fin n)) :

    Convert mathlib's Convex to the book's strict-parameter definition.

    theorem isConvexSet_iff_convex (n : ) (C : Set (Fin n)) :

    The book's convexity definition is equivalent to mathlib's Convex for subsets of Real^n.

    def lineSegment (n : ) (x y : Fin n) :
    Set (Fin n)

    Definition 2.0.2. The set {(1 - λ) • x + λ • y | 0 ≤ λ ≤ 1} is called the (closed) line segment between x and y.

    Equations
    Instances For
      theorem lineSegment_eq_image (n : ) (x y : Fin n) :
      lineSegment n x y = (fun (t : ) => (1 - t) x + t y) '' Set.Icc 0 1

      The book's description of the line segment as an image of Icc (0:Real) 1 agrees with mathlib's segment.

      def closedHalfSpaceLE (n : ) (b : Fin n) (β : ) :
      Set (Fin n)

      Definition 2.0.3. For non-zero b ∈ Real^n and β ∈ Real, the set {x | ⟪x, b⟫ ≤ β} is a closed half-space.

      Equations
      Instances For
        def closedHalfSpaceGE (n : ) (b : Fin n) (β : ) :
        Set (Fin n)

        Definition 2.0.3. For non-zero b ∈ Real^n and β ∈ Real, the set {x | ⟪x, b⟫ ≥ β} is a closed half-space.

        Equations
        Instances For
          def openHalfSpaceLT (n : ) (b : Fin n) (β : ) :
          Set (Fin n)

          Definition 2.0.3. For non-zero b ∈ Real^n and β ∈ Real, the set {x | ⟪x, b⟫ < β} is an open half-space.

          Equations
          Instances For
            def openHalfSpaceGT (n : ) (b : Fin n) (β : ) :
            Set (Fin n)

            Definition 2.0.3. For non-zero b ∈ Real^n and β ∈ Real, the set {x | ⟪x, b⟫ > β} is an open half-space.

            Equations
            Instances For
              theorem convex_iInter_family {ι : Sort u_1} (n : ) (C : ιSet (Fin n)) (hC : ∀ (i : ι), Convex (C i)) :
              Convex (⋂ (i : ι), C i)

              Theorem 2.1. The intersection of an arbitrary collection of convex sets is convex.

              theorem isLinearMap_dotProduct_left (n : ) (b : Fin n) :
              IsLinearMap fun (x : Fin n) => x ⬝ᵥ b

              The dot product with a fixed vector is linear in the left argument.

              theorem convex_dotProduct_le (n : ) (b : Fin n) (β : ) :
              Convex {x : Fin n | x ⬝ᵥ b β}

              Each half-space defined by a dot product inequality is convex.

              theorem convex_set_of_dotProduct_le {ι : Sort u_1} (n : ) (b : ιFin n) (β : ι) :
              Convex {x : Fin n | ∀ (i : ι), x ⬝ᵥ b i β i}

              Corollary 2.1.1. For vectors b i ∈ Real^n and scalars β i ∈ Real indexed by an arbitrary set ι, the set C = {x | ⟪x, b i⟫ ≤ β i, ∀ i} is convex.

              def IsPolyhedralConvexSet (n : ) (C : Set (Fin n)) :

              Definition 2.1.2. A set is a polyhedral convex set if it can be expressed as the intersection of finitely many closed half-spaces in Real^n.

              Equations
              Instances For
                def IsConvexCombination (n m : ) (x : Fin mFin n) (y : Fin n) :

                Definition 2.2.10. A vector sum λ₁ x₁ + ⋯ + λₘ xₘ is called a convex combination of x₁, ..., xₘ if λ i ≥ 0 for all i and λ₁ + ⋯ + λₘ = 1.

                Equations
                Instances For
                  theorem convex_mem_of_isConvexCombination (n : ) (C : Set (Fin n)) :
                  Convex C∀ (m : ) (x : Fin mFin n) (y : Fin n), (∀ (i : Fin m), x i C)IsConvexCombination n m x yy C

                  A convex set contains all finite convex combinations of its elements.

                  theorem isConvexCombination_two (n : ) (x y : Fin n) (a b : ) :
                  0 a0 ba + b = 1IsConvexCombination n 2 (fun (i : Fin 2) => if i = 0 then x else y) (a x + b y)

                  A two-point convex combination is an IsConvexCombination.

                  theorem convex_of_contains_convexCombinations (n : ) (C : Set (Fin n)) :
                  (∀ (m : ) (x : Fin mFin n) (y : Fin n), (∀ (i : Fin m), x i C)IsConvexCombination n m x yy C)Convex C

                  If a set contains all finite convex combinations of its elements, then it is convex.

                  theorem convex_iff_contains_convex_combinations (n : ) (C : Set (Fin n)) :
                  Convex C ∀ (m : ) (x : Fin mFin n) (y : Fin n), (∀ (i : Fin m), x i C)IsConvexCombination n m x yy C

                  Theorem 2.2. A subset of Real^n is convex if and only if it contains all the convex combinations of its elements.

                  def convexHullIntersection (n : ) (S : Set (Fin n)) :
                  Set (Fin n)

                  Definition 2.3.10. The intersection of all convex sets containing a subset S ⊆ Real^n is called the convex hull of S and is denoted by conv S.

                  Equations
                  Instances For

                    The book's convex hull definition agrees with mathlib's convexHull.

                    theorem exists_fin_convexCombination_of_exists_fintype (n : ) (S : Set (Fin n)) (y : Fin n) :
                    (∃ (ι : Type) (x : Fintype ι) (w : ι) (z : ιFin n), (∀ (i : ι), 0 w i) i : ι, w i = 1 (∀ (i : ι), z i S) i : ι, w i z i = y)∃ (m : ) (x : Fin mFin n), (∀ (i : Fin m), x i S) IsConvexCombination n m x y

                    Convert a Fintype-indexed convex combination into a Fin m-indexed one.

                    theorem mem_convexHull_iff_exists_fin_isConvexCombination (n : ) (S : Set (Fin n)) (y : Fin n) :
                    y (convexHull ) S ∃ (m : ) (x : Fin mFin n), (∀ (i : Fin m), x i S) IsConvexCombination n m x y

                    Characterize membership in the convex hull via IsConvexCombination.

                    theorem convexHull_eq_setOf_convexCombination (n : ) (S : Set (Fin n)) :
                    (convexHull ) S = {y : Fin n | ∃ (m : ) (x : Fin mFin n), (∀ (i : Fin m), x i S) IsConvexCombination n m x y}

                    Theorem 2.3. For any S ⊆ Real^n, conv S consists of all the convex combinations of the elements of S.

                    theorem range_choice_index {n m k : } (b : Fin (m + 1)Fin n) {x : Fin kFin n} (hx : ∀ (i : Fin k), x i Set.range b) :
                    ∃ (f : Fin kFin (m + 1)), ∀ (i : Fin k), x i = b (f i)

                    Choose indices witnessing membership in Set.range.

                    theorem weights_fiber_sum_eq {k m : } (f : Fin kFin (m + 1)) (w : Fin k) (hw : ∀ (i : Fin k), 0 w i) :
                    (∀ (j : Fin (m + 1)), 0 i : Fin k, if f i = j then w i else 0) (∑ j : Fin (m + 1), i : Fin k, if f i = j then w i else 0) = i : Fin k, w i

                    Summing weights over fibers preserves nonnegativity and total weight.

                    theorem weighted_sum_fiber_eq {n m k : } (b : Fin (m + 1)Fin n) (f : Fin kFin (m + 1)) (w : Fin k) (x : Fin kFin n) (hx : ∀ (i : Fin k), x i = b (f i)) :
                    j : Fin (m + 1), (∑ i : Fin k, if f i = j then w i else 0) b j = i : Fin k, w i x i

                    Summing weights over fibers preserves the weighted sum.

                    theorem convexHull_range_eq_setOf_weighted_sum (n m : ) (b : Fin (m + 1)Fin n) :
                    (convexHull ) (Set.range b) = {y : Fin n | ∃ (w : Fin (m + 1)), (∀ (i : Fin (m + 1)), 0 w i) i : Fin (m + 1), w i = 1 y = i : Fin (m + 1), w i b i}

                    Corollary 2.3.1. The convex hull of a finite subset {b_0, ..., b_m} of Real^n consists of all vectors of the form λ_0 b_0 + ⋯ + λ_m b_m with λ_i ≥ 0 and λ_0 + ⋯ + λ_m = 1.

                    def IsPolytope (n : ) (P : Set (Fin n)) :

                    Definition 2.3.11. A set which is the convex hull of finitely many points is called a polytope.

                    Equations
                    Instances For
                      def IsSimplex (n m : ) (P : Set (Fin n)) :

                      Definition 2.3.12. If {b_0, b_1, ..., b_m} is affinely independent, its convex hull is called an m-dimensional simplex and b_0, ..., b_m are the vertices of the simplex.

                      Equations
                      Instances For
                        noncomputable def simplexBarycenter (n m : ) (b : Fin (m + 1)Fin n) :
                        Fin n

                        Definition 2.3.13. For an m-dimensional simplex with vertices b_0, ..., b_m, the point λ_0 b_0 + ⋯ + λ_m b_m with λ_0 = ⋯ = λ_m = 1 / (m + 1) is called the midpoint or barycenter of the simplex.

                        Equations
                        Instances For
                          noncomputable def convexSetDim (n : ) (C : Set (Fin n)) :

                          Definition 2.4.10. The dimension of a convex set C is the dimension of the affine hull of C.

                          Equations
                          Instances For
                            theorem simplex_dim_le_convexSetDim (n : ) (C : Set (Fin n)) (m : ) (P : Set (Fin n)) :
                            P CIsSimplex n m Pm convexSetDim n C

                            Any simplex contained in C has dimension at most convexSetDim n C.

                            theorem simplex_of_affineIndependent_finite (n : ) (C : Set (Fin n)) (hC : Convex C) {t : Set (Fin n)} (htC : t C) (htind : AffineIndependent Subtype.val) {m : } [Fintype t] (hcard : Fintype.card t = m + 1) :
                            PC, IsSimplex n m P

                            Construct a simplex from a finite affinely independent subset of a convex set.

                            theorem exists_simplex_dim_convexSetDim (n : ) (C : Set (Fin n)) (hC : Convex C) (hCne : C.Nonempty) :
                            PC, IsSimplex n (convexSetDim n C) P

                            A nonempty convex set contains a simplex of dimension convexSetDim.

                            theorem convexSetDim_isGreatest_simplex_dim (n : ) (C : Set (Fin n)) (hC : Convex C) (hCne : C.Nonempty) :
                            IsGreatest {m : | PC, IsSimplex n m P} (convexSetDim n C)

                            Theorem 2.4. The dimension of a convex set C is the maximum of the dimensions of the simplices contained in C.

                            def IsConeSet (n : ) (K : Set (Fin n)) :

                            Definition 2.5.9. A subset K of Real^n is a cone if it is closed under positive scalar multiplication, i.e. λ • x ∈ K when x ∈ K and λ > 0.

                            Equations
                            Instances For
                              def IsConvexCone (n : ) (K : Set (Fin n)) :

                              Definition 2.5.10. A convex cone is a cone which is also a convex set.

                              Equations
                              Instances For
                                theorem IsConeSet_iInter_family {ι : Sort u_1} (n : ) (K : ιSet (Fin n)) (hK : ∀ (i : ι), IsConeSet n (K i)) :
                                IsConeSet n (⋂ (i : ι), K i)

                                The intersection of cone sets is a cone.

                                theorem convexCone_iInter_family {ι : Sort u_1} (n : ) (K : ιSet (Fin n)) (hK : ∀ (i : ι), IsConvexCone n (K i)) :
                                IsConvexCone n (⋂ (i : ι), K i)

                                Theorem 2.5. The intersection of an arbitrary collection of convex cones is a convex cone.

                                theorem IsConeSet_dotProduct_le_zero (n : ) (b : Fin n) :
                                IsConeSet n {x : Fin n | x ⬝ᵥ b 0}

                                A closed half-space through the origin is a cone.

                                theorem IsConvexCone_dotProduct_le_zero (n : ) (b : Fin n) :
                                IsConvexCone n {x : Fin n | x ⬝ᵥ b 0}

                                A closed half-space through the origin is a convex cone.

                                theorem iInter_setOf_dotProduct_le_zero {ι : Sort u_1} (n : ) (b : ιFin n) :
                                ⋂ (i : ι), {x : Fin n | x ⬝ᵥ b i 0} = {x : Fin n | ∀ (i : ι), x ⬝ᵥ b i 0}

                                Intersections of dot-product half-spaces encode pointwise inequalities.

                                theorem convexCone_of_dotProduct_le_zero {ι : Sort u_1} (n : ) (b : ιFin n) :
                                IsConvexCone n {x : Fin n | ∀ (i : ι), x ⬝ᵥ b i 0}

                                Corollary 2.5.1. Let b i ∈ Real^n for i ∈ I, where I is an arbitrary index set. Then K = {x ∈ Real^n | ⟪x, b i⟫ ≤ 0, i ∈ I} is a convex cone.

                                def nonNegativeOrthant (n : ) :
                                Set (Fin n)

                                Definition 2.5.11. The non-negative orthant of Real^n is the set of vectors x = (xi_1, ..., xi_n) with xi_i ≥ 0 for all coordinates.

                                Equations
                                Instances For
                                  def positiveOrthant (n : ) :
                                  Set (Fin n)

                                  Definition 2.5.12. The positive orthant of Real^n is the set of vectors x = (xi_1, ..., xi_n) with xi_i > 0 for all coordinates.

                                  Equations
                                  Instances For
                                    def coordwiseGE (n : ) (x x' : Fin n) :

                                    Definition 2.5.13. It is customary to write x ≥ x' if x - x' belongs to the non-negative orthant, i.e. if ξ_j ≥ ξ'_j for j = 1, ..., n.

                                    Equations
                                    Instances For
                                      theorem coordwiseGE_iff_le (n : ) (x x' : Fin n) :
                                      coordwiseGE n x x' x' x

                                      The book's coordinatewise order agrees with the pointwise order on Fin n → Real.

                                      theorem isConvexCone_add_closed (n : ) (K : Set (Fin n)) :
                                      IsConvexCone n KxK, yK, x + y K

                                      A convex cone is closed under addition.

                                      theorem pos_combo_mem_of_add_closed_and_pos_smul_closed (n : ) (K : Set (Fin n)) (hadd : xK, yK, x + y K) (hsmul : xK, ∀ (t : ), 0 < tt x K) (x : Fin n) :
                                      x KyK, ∀ (a b : ), 0 < a0 < ba + b = 1a x + b y K

                                      Positive scalar closure and add-closure give two-point positive combinations.

                                      theorem convex_of_add_closed_and_pos_smul_closed (n : ) (K : Set (Fin n)) (hadd : xK, yK, x + y K) (hsmul : xK, ∀ (t : ), 0 < tt x K) :

                                      Add-closure and positive scalar closure imply convexity.

                                      theorem isConvexCone_iff_add_closed_and_pos_smul_closed (n : ) (K : Set (Fin n)) :
                                      IsConvexCone n K (∀ xK, yK, x + y K) xK, ∀ (t : ), 0 < tt x K

                                      Theorem 2.6. A subset of Real^n is a convex cone if and only if it is closed under addition and positive scalar multiplication.

                                      theorem pos_linear_combo_mem_of_add_closed_and_pos_smul_closed (n : ) (K : Set (Fin n)) (hadd : xK, yK, x + y K) (hsmul : xK, ∀ (t : ), 0 < tt x K) (m : ) (x : Fin (m + 1)Fin n) (w : Fin (m + 1)) :
                                      (∀ (i : Fin (m + 1)), x i K)(∀ (i : Fin (m + 1)), 0 < w i)i : Fin (m + 1), w i x i K

                                      Finite positive linear combinations from add-closure and positive scalar closure.

                                      theorem pos_smul_closed_of_pos_linear_combinations (n : ) (K : Set (Fin n)) (hcomb : ∀ (m : ) (x : Fin (m + 1)Fin n) (w : Fin (m + 1)), (∀ (i : Fin (m + 1)), x i K)(∀ (i : Fin (m + 1)), 0 < w i)i : Fin (m + 1), w i x i K) (x : Fin n) :
                                      x K∀ (t : ), 0 < tt x K

                                      Positive scaling follows from closure under positive linear combinations.

                                      theorem add_closed_of_pos_linear_combinations (n : ) (K : Set (Fin n)) (hcomb : ∀ (m : ) (x : Fin (m + 1)Fin n) (w : Fin (m + 1)), (∀ (i : Fin (m + 1)), x i K)(∀ (i : Fin (m + 1)), 0 < w i)i : Fin (m + 1), w i x i K) (x : Fin n) :
                                      x KyK, x + y K

                                      Add-closure follows from closure under positive linear combinations.

                                      theorem isConvexCone_iff_contains_pos_linear_combinations (n : ) (K : Set (Fin n)) :
                                      IsConvexCone n K ∀ (m : ) (x : Fin (m + 1)Fin n) (w : Fin (m + 1)), (∀ (i : Fin (m + 1)), x i K)(∀ (i : Fin (m + 1)), 0 < w i)i : Fin (m + 1), w i x i K

                                      Corollary 2.6.1. A subset of Real^n is a convex cone if and only if it contains all the positive linear combinations of its elements, i.e. sums λ₁ x₁ + ⋯ + λ_m x_m with λ_i > 0.

                                      def IsPosLinearCombination (n : ) (S : Set (Fin n)) (y : Fin n) :

                                      A point is a positive linear combination of elements of a set.

                                      Equations
                                      Instances For
                                        theorem isPosLinearCombination_smul (n : ) (S : Set (Fin n)) {y : Fin n} (hy : IsPosLinearCombination n S y) {t : } (ht : 0 < t) :

                                        Positive linear combinations are closed under positive scaling.

                                        theorem isPosLinearCombination_add (n : ) (S : Set (Fin n)) {y₁ y₂ : Fin n} (hy₁ : IsPosLinearCombination n S y₁) (hy₂ : IsPosLinearCombination n S y₂) :
                                        IsPosLinearCombination n S (y₁ + y₂)

                                        The sum of two positive linear combinations is a positive linear combination.

                                        theorem positiveLinearCombinationCone_isSmallest (n : ) (S : Set (Fin n)) :
                                        have K := {y : Fin n | ∃ (m : ) (x : Fin (m + 1)Fin n) (w : Fin (m + 1)), (∀ (i : Fin (m + 1)), x i S) (∀ (i : Fin (m + 1)), 0 < w i) y = i : Fin (m + 1), w i x i}; IsConvexCone n K S K ∀ (K' : Set (Fin n)), IsConvexCone n K'S K'K K'

                                        Corollary 2.6.2. Let S ⊆ Real^n, and let K be the set of all positive linear combinations of elements of S. Then K is the smallest convex cone containing S.

                                        theorem positiveScalarCone_isSmallest (n : ) (C : Set (Fin n)) (hC : Convex C) :
                                        have K := {y : Fin n | xC, ∃ (t : ), 0 < t y = t x}; IsConvexCone n K C K ∀ (K' : Set (Fin n)), IsConvexCone n K'C K'K K'

                                        Corollary 2.6.3. Let C be a convex set, and let K = {λ • x | λ > 0, x ∈ C}. Then K is the smallest convex cone which includes C.

                                        def convexConeGenerated (n : ) (S : Set (Fin n)) :
                                        Set (Fin n)

                                        Definition 2.6.10. The convex cone obtained by adjoining the origin to the cone in Corollary 2.6.2 (equivalently, Corollary 2.6.3) is called the convex cone generated by S (or by a convex set C) and is denoted cone S.

                                        Equations
                                        Instances For
                                          def rayNonneg (n : ) (S : Set (Fin n)) :
                                          Set (Fin n)

                                          The nonnegative ray generated by a set.

                                          Equations
                                          Instances For

                                            Elements of the nonnegative ray lie in the generated cone.

                                            The generated cone is convex.