BanditRLlib
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

Francesco Orabona

Location
Section 2.2.1, Example 2.27: hinge loss
Pages
printed18/PDF30
Open at the cited pages
proof flow · ordered flow

Calculate the complete support set

Read top to bottom to follow the argument or procedure.

  1. 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.

  2. 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.

  3. 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.

Source theorem · faithful restatement

Example2.27 hinge loss

Original at printed18 ↗
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. For the actual hinge: negative margin gives{0}, equality gives every -alpha z for alpha in[0,1], positive margin gives{-z}.

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.

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. Actual hinge loss
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.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
def sourceHinge (z x : E) : EReal
Mathematics ↔ Lean

Every affine support equals its slope

Lean declarationBanditRL.OnlineConvex.affine_subdifferential

Compiled

Plain-English statement. Every affine support equals its slope

Mathematical reading. Every affine support equals its slope
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}
Mathematics ↔ Lean

Actually instantiate the full maximum rule

Lean declarationBanditRL.OnlineConvex.hinge_subdifferential_hull

Compiled

Plain-English statement. Actually instantiate the full maximum rule

Mathematical reading. Actually instantiate the full maximum rule
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)
Mathematics ↔ Lean

The full three-branch hinge subdifferential

Lean declarationBanditRL.OnlineConvex.example_2_27

Compiled

Plain-English statement. The full three-branch hinge subdifferential

Mathematical reading. The full three-branch hinge subdifferential
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 = if 1 - inner ℝ z x < 0 then {0} else if 1 - inner ℝ z x = 0 then {g | ∃ α ∈ Icc (0 : ℝ) 1, g = -(α • z)} else {-z}

Maintainer contract

Open the canonical completion definition and blockers

Thirteen theorems and two definitions. Later source obligations, Chapter 2 and the whole book remain incomplete.

Remaining blockers

  • Later source obligations, Chapter 2 and the whole book remain incomplete.

Chapter implementation status

The compact summary keeps the reading route visible. Open it for source-linked declarations and exact remaining gaps.

Open 0 implementation records0 compiled · 0 partial · 0 blocked · 0 planned
MilestoneStatusLean declarationRemaining gap

Open boundaries

  • 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.

All Lean modules in this chapter

Open the complete module list (1 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof.OnlineHinge151Compiled