BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

Teaching chapter 19 of 31 · Canonical route compiled

Absolute-value subdifferential

Characterize every global real support slope; retain the full closed zero interval.

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

Learning goals

  • Prove necessity and global sufficiency in every sign case.
  • Keep both zero-interval endpoints and fractional slopes.
  • Use the actual shared supporting inequality, without assuming a chosen subgradient.

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.24: scalar absolute value
Pages
printed18/PDF30
Open at the cited pages
proof flow · ordered flow

Characterize all global supports

Read top to bottom to follow the argument or procedure.

  1. Test necessary inequalities

    At nonzero x, actual tests y=0 and y=2x give x(g-1)=0 for positive x or x(g+1)=0 for negative x. The strict sign guarantees x≠0 for cancellation. The inequalities y≤|y| and -y≤|y| prove sufficiency at EVERY real y. At zero, tests y=1,-1 give -1≤g≤1. Conversely, any g in the FULL CLOSED interval globally supports: multiply the upper bound when y≥0 and the lower bound with reversed order when y<0. Both endpoints and every interior slope remain; choosing only0 or asserting existence is weaker.

  2. Prove every proposed slope works

    Prove both directions with every global test y. At zero, tests y=1,-1 give -1≤g≤1. Conversely, any g in the FULL CLOSED interval globally supports: multiply the upper bound when y≥0 and the lower bound with reversed order when y<0. Both endpoints and every interior slope remain; choosing only0 or asserting existence is weaker. At nonzero x, actual tests y=0 and y=2x give x(g-1)=0 for positive x or x(g+1)=0 for negative x. The strict sign guarantees x≠0 for cancellation. The inequalities y≤|y| and -y≤|y| prove sufficiency at EVERY real y.

  3. Cover every real query

    The exact allx terminal dispatches the three proved equalities, deriving x<0 in the final else. No support inequality is assumed as a consumer premise.

Source theorem · faithful restatement

Example2.24

Original at printed18 ↗
Bounded library declarationsThe source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here. Later source obligations, Chapter 2 and the whole book remain incomplete.

Every global support slope is characterized exactly, at every real query.

Model
Real scalar absolute value, embedded into EReal.
Assumptions
None for the allx terminal. Positive/negative leaves have only their strict sign hypothesis; zero leaf has no supplied slope/support premise.
Algorithm parameters
Every real query x and every real candidate slope g; the support definition quantifies every ambient real y.
Regret notion
No algorithm/probability/feedback/regret or measurable/computable selection guarantee.
Guarantee
Complete three-case set equality, including the full CLOSED [-1,1] at zero.
Source mathematical statement. The subdifferential is {1} at positive x, the closed interval [-1,1] at zero, and {-1} at negative x.

BanditRLlib relationship. The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here.

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

Positive queries: slope1

Lean declarationBanditRL.OnlineConvex.abs_subgradient_positive

Compiled

Plain-English statement. Positive queries: slope1

Mathematical reading. Positive queries: slope1
Intuition
Characterize every global supporting slope in both directions.
Why it is needed
Positive queries: slope1
Place in the proof
Four scalar theorems supporting this bounded reader. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
At nonzero x, actual tests y=0 and y=2x give x(g-1)=0 for positive x or x(g+1)=0 for negative x. The strict sign guarantees x≠0 for cancellation. The inequalities y≤|y| and -y≤|y| prove sufficiency at EVERY real y.
Lean reading notes
The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem abs_subgradient_positive (x : ℝ) (hx : 0 < x) : SourceSubdifferential (fun y : ℝ => ((|y| : ℝ) : EReal)) x = {(1 : ℝ)}
Mathematics ↔ Lean

Zero: every slope in [-1,1]

Lean declarationBanditRL.OnlineConvex.abs_subgradient_zero

Compiled

Plain-English statement. Zero: every slope in [-1,1]

Mathematical reading. Zero: every slope in [-1,1]
Intuition
Characterize every global supporting slope in both directions.
Why it is needed
Zero: every slope in [-1,1]
Place in the proof
Four scalar theorems supporting this bounded reader. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
At zero, tests y=1,-1 give -1≤g≤1. Conversely, any g in the FULL CLOSED interval globally supports: multiply the upper bound when y≥0 and the lower bound with reversed order when y<0. Both endpoints and every interior slope remain; choosing only0 or asserting existence is weaker.
Lean reading notes
The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem abs_subgradient_zero : SourceSubdifferential (fun y : ℝ => ((|y| : ℝ) : EReal)) 0 = Icc (-1 : ℝ) 1
Mathematics ↔ Lean

Negative queries: slope-1

Lean declarationBanditRL.OnlineConvex.abs_subgradient_negative

Compiled

Plain-English statement. Negative queries: slope-1

Mathematical reading. Negative queries: slope-1
Intuition
Characterize every global supporting slope in both directions.
Why it is needed
Negative queries: slope-1
Place in the proof
Four scalar theorems supporting this bounded reader. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
At nonzero x, actual tests y=0 and y=2x give x(g-1)=0 for positive x or x(g+1)=0 for negative x. The strict sign guarantees x≠0 for cancellation. The inequalities y≤|y| and -y≤|y| prove sufficiency at EVERY real y.
Lean reading notes
The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem abs_subgradient_negative (x : ℝ) (hx : x < 0) : SourceSubdifferential (fun y : ℝ => ((|y| : ℝ) : EReal)) x = {(-1 : ℝ)}
Mathematics ↔ Lean

The exact source three-case equality

Lean declarationBanditRL.OnlineConvex.example_2_24

Compiled

Plain-English statement. The exact source three-case equality

Mathematical reading. The exact source three-case equality
Intuition
Characterize every global supporting slope in both directions.
Why it is needed
The exact source three-case equality
Place in the proof
Four scalar theorems supporting this bounded reader. Helpers are not additional printed source results.
Proof and Lean reading notes
Proof idea
Dispatch all three exact sign equalities; zero has the full interval, final else derives negativity. At zero, tests y=1,-1 give -1≤g≤1. Conversely, any g in the FULL CLOSED interval globally supports: multiply the upper bound when y≥0 and the lower bound with reversed order when y<0. Both endpoints and every interior slope remain; choosing only0 or asserting existence is weaker. At nonzero x, actual tests y=0 and y=2x give x(g-1)=0 for positive x or x(g+1)=0 for negative x. The strict sign guarantees x≠0 for cancellation. The inequalities y≤|y| and -y≤|y| prove sufficiency at EVERY real y.
Lean reading notes
The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
BanditRL.OnlineConvex.abs_subgradient_positive, BanditRL.OnlineConvex.abs_subgradient_zero, BanditRL.OnlineConvex.abs_subgradient_negative
Exact Lean statement
theorem example_2_24 (x : ℝ) : SourceSubdifferential (fun y : ℝ => ((|y| : ℝ) : EReal)) x = if 0 < x then {(1 : ℝ)} else if x = 0 then Icc (-1 : ℝ) 1 else {(-1 : ℝ)}

Maintainer contract

Open the canonical completion definition and blockers

Four scalar theorems. 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

  • The source states the three exact scalar cases without a derivation. The direct inequalities below supply a library proof; G2.24.POS, G2.24.ZERO and G2.24.NEG record the missing local source derivations. Four real-scalar theorems have no abstract-space, finite-dimensionality, convexity or differentiability premises. The absolute-value function is finite and proper everywhere, so the wider shared support definition causes no improper-function ambiguity here.

All Lean modules in this chapter

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