Documentation

Convex.Function.Subgradient

Subgradient of convex functions #

The file defines subgradient for convex functions in E and proves some basic properties.

Let f : E → ℝ be a convex function on s and g : E, where s is a set of E. g is a subgradient of f at x if for any y ∈ s, we have f y ≥ f x + inner g (y - x). The insight comes from the first order condition of convex function.

Main declarations #

Main results #

def HasSubgradientAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] (f : E) (g : E) (x : E) :

Subgradient of functions -

Equations
Instances For
    def HasSubgradientWithinAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] (f : E) (g : E) (s : Set E) (x : E) :
    Equations
    Instances For
      def SubderivAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] (f : E) (x : E) :
      Set E

      Subderiv of functions -

      Equations
      Instances For
        def SubderivWithinAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] (f : E) (s : Set E) (x : E) :
        Set E
        Equations
        Instances For
          @[simp]
          theorem mem_SubderivAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {g : E} {x : E} :
          @[simp]
          theorem hasSubgradientWithinAt_univ {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {g : E} {x : E} :
          theorem HasSubgradientAt.hasSubgradientWithinAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {g : E} {x : E} {s : Set E} :
          theorem SubderivAt_SubderivWithinAt {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} :
          SubderivAt f x = SubderivWithinAt f Set.univ x

          Congruence properties of the Subderiv #

          theorem SubderivAt.congr {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {x : E} {f₁ : E} {f₂ : E} (h : f₁ = f₂) :
          SubderivAt f₁ x = SubderivAt f₂ x
          theorem SubderivWithinAt.congr {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {x : E} {f₁ : E} {f₂ : E} {s : Set E} (h : ys, f₁ y = f₂ y) (hf : f₁ x = f₂ x) :
          theorem SubderivWithinAt.congr_of_mem {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {x : E} {f₁ : E} {f₂ : E} {s : Set E} (xs : x s) (h : ys, f₁ y = f₂ y) :
          theorem SubderivAt.congr_mono {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {x : E} {f₁ : E} {f₂ : E} {t : Set E} {s : Set E} (h : ys, f₁ y = f₂ y) (hx : f₁ x = f₂ x) (h₁ : t s) :

          Basic properties about Subderiv #

          theorem SubderivWithinAt.Nonempty {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f : E} {s : Set E} (hf : ConvexOn s f) (hc : ContinuousOn f (interior s)) (x : E) :
          x interior s(SubderivWithinAt f s x).Nonempty
          theorem SubderivAt.nonempty {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f : E} (hf : ConvexOn Set.univ f) (hc : ContinuousOn f Set.univ) (x : E) :
          theorem SubderivAt.isClosed {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} (x : E) :

          The subderiv of f at x is a closed set. -

          theorem SubderivWithinAt.isClosed {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {s : Set E} (x : E) :
          theorem SubderivAt.convex {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} (x : E) :

          The subderiv of f at x is a convex set. -

          theorem SubderivWithinAt.convex {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {s : Set E} (x : E) :
          x sConvex (SubderivWithinAt f s x)
          theorem subgradientAt_mono {E : Type u_2} [NormedAddCommGroup E] [InnerProductSpace E] {x : E} {y : E} {u : E} {v : E} {f : E} (hu : u SubderivAt f x) (hv : v SubderivAt f y) :
          u - v, x - y⟫_ 0

          Monotonicity of subderiv-

          Calculation of Subderiv #

          theorem SubderivWithinAt_eq_gradient {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f : E} {x : E} {s : Set E} {f'x : E} (hx : x interior s) (hf : ConvexOn s f) (h : HasGradientAt f f'x x) :
          SubderivWithinAt f s x = {f'x}

          Subderiv of differentiable convex functions -

          theorem SubderivWithinAt_eq_FDeriv {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f : E} {x : E} {s : Set E} {f' : EE →L[] } (hx : x interior s) (hf : ConvexOn s f) (h : HasFDerivAt f (f' x) x) :

          Alternarive version for FDeriv -

          theorem SubderivAt_eq_gradient {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f : E} {x : E} {f'x : E} (hf : ConvexOn Set.univ f) (h : HasGradientAt f f'x x) :
          SubderivAt f x = {f'x}

          Optimality Theory for Unconstrained Nondifferentiable Problems #

          theorem HasSubgradientAt_zero_of_isMinOn {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} (h : IsMinOn f Set.univ x) :
          theorem isMinOn_of_HasSubgradentAt_zero {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} (h : HasSubgradientAt f 0 x) :
          IsMinOn f Set.univ x
          theorem HasSubgradientAt_zero_iff_isMinOn {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} :
          HasSubgradientAt f 0 x IsMinOn f Set.univ x

          x' minimize f if and only if 0 is a subgradient of f at x' -

          theorem HasSubgradientWithinAt_zero_of_isMinOn {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} {s : Set E} (h : IsMinOn f s x) :
          theorem isMinOn_of_HasSubgradentWithinAt_zero {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} {s : Set E} (h : HasSubgradientWithinAt f 0 s x) :
          IsMinOn f s x

          Computing Subderiv #

          theorem HasSubgradientAt.pos_smul {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {g : E} {x : E} {c : } (h : HasSubgradientAt f g x) (hc : 0 < c) :
          HasSubgradientAt (c f) (c g) x

          Multiplication by a Positive Scalar-

          theorem SubderivAt.pos_smul {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f : E} {x : E} {c : } (hc : 0 < c) :
          SubderivAt (c f) x = c SubderivAt f x
          theorem SubderivAt.add_subset {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] {f₁ : E} {f₂ : E} (x : E) :
          SubderivAt f₁ x + SubderivAt f₂ x SubderivAt (f₁ + f₂) x

          Subderivatives of the sum of two functions is a subset of the sum of the subderivatives of the two functions -

          theorem SubderivAt.add {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] [CompleteSpace E] {f₁ : E} {f₂ : E} (h₁ : ConvexOn Set.univ f₁) (h₂ : ConvexOn Set.univ f₂) (hcon : ContinuousOn f₁ Set.univ) (x : E) :
          SubderivAt f₁ x + SubderivAt f₂ x = SubderivAt (f₁ + f₂) x

          Examples of Subderiv #

          theorem SubderivAt_of_norm_at_zero {E : Type u_1} [NormedAddCommGroup E] [InnerProductSpace E] :
          SubderivAt (fun (x : E) => x) 0 = {g : E | g 1}
          theorem SubderivAt_abs (x : ) :
          SubderivAt abs x = if x = 0 then Set.Icc (-1) 1 else {x.sign}