Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.
Teaching chapter 22 of 31 · Canonical route compiled
Hinge-loss subdifferential
The complete hinge subdifferential: zero, negative slope and the entire boundary segment.
How to read the status. It describes this page's canonical local Lean route, not completion of the cited textbook chapter or every extension listed below.
Orientation
Who should read this. Readers of Orabona Example2.27.
Learning goals
Derive the unique global support of an affine function.
Instantiate the maximum rule with actual proper convex continuous functions.
Keep the full closed boundary segment and the zero-vector case.
Textbook crosswalk
Read the mathematics before the Lean interface
This reading follows Online Learning: A Modern Introduction Using Convex Optimization. Teaching routes group mathematical dependencies across the shared library. Visible page labels use the cited source's numbered pages; source buttons use the PDF viewer's physical page index, including front matter. Companion papers cover algorithm-specific results.
Primary spine · arXiv:1912.13213v10,21June2026
Online Learning: A Modern Introduction Using Convex Optimization
Read top to bottom to follow the argument or procedure.
01
Derive affine supports
A vector g supporting inner(a,y)+b is tested at y=x+(g-a). The actual supporting inequality forces inner(g-a,g-a)<=0, hence g=a. Conversely, the affine identity gives support at EVERY ambient y. This proves the full affine singleton without finite dimension.
02
Apply the actual maximum rule
The complete retained hingeFamily definition maps Bool false to the affine slope0/offset0 and Bool true to slope-z/offset1. Its two concrete components are f0(y)=0 and f1(y)=inner(-z,y)+1; the definition itself has no finite-dimension or function-regularity premise. Properness, convex epigraphs, finite query values and ambient continuity are proved from real affine algebra. Actual finite-maximum bounds identify their maximum with the hinge, then the full Theorem2.26 yields the ordinary hull of ALL active component supports.
03
Classify activity and take the ordinary hull
For m(x)=1-inner(z,x), negative margin activates only f0 and gives{0}; positive margin only f1 and gives{-z}; zero margin activates both and gives the active union{0,-z}. Strict signs exclude the inactive component. The active union itself omits genuine boundary mixtures. The ordinary convex hull of{0,-z} is the entire segment{-alpha z:alpha in[0,1]}, including both endpoints and every intermediate mixture; singleton hulls remain singletons. Both inclusions of the three-branch equality follow, without a hull closure or membership-only replacement.
Bounded library declarationsExample 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified. Later source obligations, Chapter 2 and the whole book remain incomplete.
For every z and x in finite-dimensional real Euclidean space, the full ambient hinge subdifferential follows these three cases. At equality no boundary support is omitted.
Model
Finite-dimensional real inner-product hinge calculus; helper contexts are shown in exact Lean.
Assumptions
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified.
Algorithm parameters
Every z,x/candidate g and EVERY ambient support-test y; ALL alpha in inclusive[0,1].
Regret notion
No algorithm, regret or probability guarantee is asserted.
Guarantee
Full three-branch set equality with strict singleton cases and entire boundary segment. z0 is allowed and lies in the positive-margin constant1 branch.
Source mathematical statement.Formula renderer unavailable; readable fallback: For the actual hinge: negative margin gives{0}, equality gives every -alpha z for alpha in[0,1], positive margin gives{-z}.\(\ell_z(x)=\max(1-\langle z,x\rangle,0),\qquad\partial\ell_z(x)=\begin{cases}\{0\}&m(x)<0\\\{-\alpha z:0\le\alpha\le1\}&m(x)=0\\\{-z\}&m(x)>0\end{cases}\)Swipe to read the full formula →
BanditRLlib relationship. Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified.
The mathematical content is restated in this site's notation; wording is ours. See printed18 in the linked source for the original statement and full assumptions.
Natural-language and Lean side by side
The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.
Mathematics ↔ Lean
Actual hinge loss
Lean declarationBanditRL.OnlineConvex.sourceHinge
Compiled
Plain-English statement. Actual hinge loss
Mathematical reading.Formula renderer unavailable; readable fallback: Actual hinge loss\(\ell_z(x)=\max(1-\langle z,x\rangle,0)\)Swipe to read the full formula →
Intuition
Actual finite real maximum of the affine margin and zero.
Why it is needed
Actual hinge loss
Place in the proof
Thirteen theorems and two definitions in this bounded route. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
A retained definition of the function max(1-inner(z,x),0) embedded into EReal, rather than the proof of its support formula.
Lean reading notes
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified. Later source obligations, Chapter 2 and the whole book remain incomplete.
Plain-English statement. Every affine support equals its slope
Mathematical reading.Formula renderer unavailable; readable fallback: Every affine support equals its slope\(\partial(\langle a,\cdot\rangle+b)(x)=\{a\}\)Swipe to read the full formula →
Intuition
The actual two affine components give singleton supports, and ties require the full ordinary segment.
Why it is needed
Every affine support equals its slope
Place in the proof
Thirteen theorems and two definitions in this bounded route. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
A vector g supporting inner(a,y)+b is tested at y=x+(g-a). The actual supporting inequality forces inner(g-a,g-a)<=0, hence g=a. Conversely, the affine identity gives support at EVERY ambient y. This proves the full affine singleton without finite dimension.
Lean reading notes
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem affine_subdifferential (a : E) (b : ℝ) (x : E) : SourceSubdifferential (fun y => ((inner ℝ a y + b : ℝ) : EReal)) x = {a}
Plain-English statement. Actually instantiate the full maximum rule
Mathematical reading.Formula renderer unavailable; readable fallback: Actually instantiate the full maximum rule\(\partial\ell_z(x)=\operatorname{conv}U(x)\)Swipe to read the full formula →
Intuition
The actual two affine components give singleton supports, and ties require the full ordinary segment.
Why it is needed
Actually instantiate the full maximum rule
Place in the proof
Thirteen theorems and two definitions in this bounded route. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
The complete retained hingeFamily definition maps Bool false to the affine slope0/offset0 and Bool true to slope-z/offset1. Its two concrete components are f0(y)=0 and f1(y)=inner(-z,y)+1; the definition itself has no finite-dimension or function-regularity premise. Properness, convex epigraphs, finite query values and ambient continuity are proved from real affine algebra. Actual finite-maximum bounds identify their maximum with the hinge, then the full Theorem2.26 yields the ordinary hull of ALL active component supports.
Lean reading notes
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem hinge_subdifferential_hull [FiniteDimensional ℝ E] (z x : E) : SourceSubdifferential (sourceHinge z) x = convexHull ℝ (SourceActiveSubgradientUnion (hingeFamily z) x)
Plain-English statement. The full three-branch hinge subdifferential
Mathematical reading.Formula renderer unavailable; readable fallback: The full three-branch hinge subdifferential\(\partial\ell_z(x)=\begin{cases}\{0\}&m(x)<0\\\{-\alpha z:0\le\alpha\le1\}&m(x)=0\\\{-z\}&m(x)>0\end{cases}\)Swipe to read the full formula →
Intuition
The actual two affine components give singleton supports, and ties require the full ordinary segment.
Why it is needed
The full three-branch hinge subdifferential
Place in the proof
Thirteen theorems and two definitions in this bounded route. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
A vector g supporting inner(a,y)+b is tested at y=x+(g-a). The actual supporting inequality forces inner(g-a,g-a)<=0, hence g=a. Conversely, the affine identity gives support at EVERY ambient y. This proves the full affine singleton without finite dimension. The complete retained hingeFamily definition maps Bool false to the affine slope0/offset0 and Bool true to slope-z/offset1. Its two concrete components are f0(y)=0 and f1(y)=inner(-z,y)+1; the definition itself has no finite-dimension or function-regularity premise. Properness, convex epigraphs, finite query values and ambient continuity are proved from real affine algebra. Actual finite-maximum bounds identify their maximum with the hinge, then the full Theorem2.26 yields the ordinary hull of ALL active component supports. For m(x)=1-inner(z,x), negative margin activates only f0 and gives{0}; positive margin only f1 and gives{-z}; zero margin activates both and gives the active union{0,-z}. Strict signs exclude the inactive component. The active union itself omits genuine boundary mixtures. The ordinary convex hull of{0,-z} is the entire segment{-alpha z:alpha in[0,1]}, including both endpoints and every intermediate mixture; singleton hulls remain singletons. Both inclusions of the three-branch equality follow, without a hull closure or membership-only replacement.
Lean reading notes
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
BanditRL.OnlineConvex.hinge_subdifferential_hull
Exact Lean statement
theorem example_2_27 [FiniteDimensional ℝ E] (z x : E) : SourceSubdifferential (sourceHinge z) x = if1 - inner ℝ z x < 0then {0} elseif1 - inner ℝ z x = 0then {g | ∃ α ∈ Icc (0 : ℝ) 1, g = -(α • z)} else {-z}
Example 2.27 states the full three-case equality without a proof (GAP.EXAMPLE-PROOF). The derivation here is the library proof: establish both affine supports and the maximum-rule hypotheses, classify the active components, and take their ordinary convex hull. The main equality and hull theorem use a finite-dimensional real inner-product space; the other helpers and both definitions retain the real inner-product structure without finite dimension. The hinge and both components are finite everywhere, so the shared support predicate agrees with the proper-function source context here. No nonzero z or positive-dimension premise is imposed. A coordinate-isometry adapter is not separately certified.