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

Teaching chapter 17 of 31 · Canonical route compiled

A singleton global support produces the derivative

Prove the singleton equivalence and gradient identity for an explicitly specified ambient real-germ interpretation; keep the source interpretation gaps visible.

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 Theorem 2.22.

Learning goals

  • Keep local real values while differentiating extended-real functions.
  • Derive domain interior from nonzero normal perturbation and a singleton.
  • Use actual neighboring supports and compactness to produce a Frechet derivative.
  • Distinguish a smooth toReal cast from a genuine real germ, preserving required later results.
  • Locate absolute and hinge kinks, distinguish ambient from tangential differentiability, and include zero effective normals.

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 opening examples and Section 2.2.1 Theorem 2.22, with explicit library interpretations and derived criteria
Pages
printed16–17 / PDF28–29
Open at the cited pages
proof flow · ordered flow

Produce both directions of the equivalence

Read top to bottom to follow the argument or procedure.

  1. Produce the singleton from a real germ

    A real germ supplies finite-neighborhood affine CONTACT, hence global noBottom. Regularity and accepted Theorem2.7 produce actual global gradient support. A local minimum of the supported residual has derivative zero; Riesz injectivity gives uniqueness. Eventual equality of real representatives gives the same gradient.

  2. Force interior from a singleton

    Actual nonzero boundary normal would add a distinct global support. No interior input is assumed.

  3. Produce the derivative from global inequalities

    A nonzero supporting normal at a domain boundary would give a second support g+d, so a singleton forces ambient interior. Convex local Lipschitzness bounds every nearby support; genuine nonbottom-filter limits and finite-dimensional compactness identify the selected support limit. Two actual global inequalities bound the nonnegative remainder by norm(G(y)-g)*norm(y-x), yielding the Frechet derivative. Proof-internal choice is not an algorithm or computational oracle.

2 distinct theory routes, one frontier.Open the statement you want to compare; the other routes stay compact.
Source theorem · faithful restatementTheorem 2.22Bounded library declarationsprinted17
Source theorem · faithful restatement

Theorem 2.22

Original at printed17 ↗
Bounded library declarationsThe source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.

A convex extended-real function finite at x is differentiable there iff its subdifferential is a singleton, whose member is the gradient.

Model
EReal with both infinities, convex REAL-height epigraph and global support inequality.
Assumptions
Theorem2.22 assumes convex real-height epigraph and an actual finite real value at x. Properness/noBottom and ambient interior are DERIVED in its directions; no closedness/lsc/boundedness/Lipschitz/interior oracle is added. Supports test ALL ambient y, including top outside the finite neighborhood.
Algorithm parameters
Every f,x with finite f(x); every local differentiable real representative h agreeing in the ambient neighborhood.
Regret notion
No algorithm, regret or measurable support-selection guarantee.
Guarantee
SourceDifferentiableAt f x iff exists g, S(f,x)={g}; for every agreeing differentiable h, S(f,x)={gradient h x}.
Source mathematical statement. For convex f finite at x, the printed theorem equates differentiability with singleton subdifferential and identifies its member with the gradient; its extended-valued semantics require interpretation.

BanditRLlib relationship. The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.

Source theorem · faithful restatementSection 2.2: introductory absolute and labelled hinge examplesThree derived criteria; source and library proof kept separateprinted16 / PDF28
Source theorem · faithful restatement

Section 2.2: introductory absolute and labelled hinge examples

Original at printed16 / PDF28 ↗
Three derived criteria; source and library proof kept separateThese three derived criteria cover the two introductory loss families. Chapter 2 and the whole book remain incomplete; the overlapping source inventory is not a proof-completion denominator. The source paragraph supplies examples without local proofs. Its label domain and nondifferentiability scope are not explicitly quantified; the precise whole-space classifications below are library results. The pinned source is unchanged.

The source introduces shifted absolute value and labelled hinge as examples of convex losses that need not be differentiable. It gives no local proof, kink classification or explicit label/nonzero qualification in this paragraph.

Model
Deterministic convex analysis on the whole real line or a finite-dimensional real inner-product space.
Assumptions
The printed shift 10 is the instance c=10. The labelled formula is recovered by a=y·z. Arbitrary real centers and labels, abstract finite-dimensional real inner-product spaces, and the pointwise/global iff conclusions are explicit derived generalizations. Dimension zero and zero effective normals are included. All derivatives are ambient real Fréchet derivatives; a differentiable restriction to a tangent line or constrained set does not imply ambient differentiability.
Algorithm parameters
Every real c, every vector a, and every real label y and feature z; all ambient query points.
Regret notion
These static loss examples assert no algorithmic, regret or feedback guarantee.
Guarantee
All three loss forms are convex. Absolute value is differentiable exactly off c; hinge is differentiable exactly off its unit margin; labelled hinge is differentiable everywhere exactly when y • z=0.
Source mathematical statement. The printed examples use center 10 and the labelled inner-product hinge. Precise differentiability criteria are derived below.

BanditRLlib relationship. For one fixed source loss, write y=y_t and z=z_t; the source pairing ⟨z_t,x⟩ is already the library pairing ⟨z,x⟩. The printed shift 10 is the instance c=10. The labelled formula is recovered by a=y·z. Arbitrary real centers and labels, abstract finite-dimensional real inner-product spaces, and the pointwise/global iff conclusions are explicit derived generalizations. Dimension zero and zero effective normals are included. All derivatives are ambient real Fréchet derivatives; a differentiable restriction to a tangent line or constrained set does not imply ambient differentiability. For the hinge, nonzero effective normal gives a genuine ambient kink on the unit margin; zero effective normal gives a constant function. This mathematical qualification is neither a change to the pinned source nor an author-endorsed correction.

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.

A curated route through definitions, key bridges, and canonical terminals stays visible. 1 additional dependency, extension, or research-frontier notes are grouped below.

Mathematics ↔ Lean

Singleton forces an interior point

Lean declarationBanditRL.OnlineConvex.singleton_subdifferential_interior

Compiled

Plain-English statement. For a convex extended-real function finite at x in a finite-dimensional real inner-product space, a singleton global support set forces x into the ambient interior of its effective domain.

Mathematical reading. For a convex extended-real function finite at x in a finite-dimensional real inner-product space, a singleton global support set forces x into the ambient interior of its effective domain.
Intuition
A finite point with a singleton global support set belongs to the ambient domain interior.
Why it is needed
Supports the singleton/gradient equivalence under the explicitly stated ambient real-germ interpretation. The source scope and differentiability gaps remain visible in the reader.
Place in the proof
Supporting lemma or endpoint for the separately specified library interpretation of Theorem 2.22; source scope and differentiability gaps remain explicit.
Proof and Lean reading notes
Proof idea
A nonzero supporting normal at the ORIGINAL domain boundary yields a distinct global support g+d and contradicts singleton equality.
Lean reading notes
The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem singleton_subdifferential_interior (f : E → EReal) (hf : IsConvexExtended f) (x : E) (hx : ∃ r : ℝ, f x = (r : EReal)) (g : E) (hg : SourceSubdifferential f x = {g}) : x ∈ interior (effectiveDomain f)
Mathematics ↔ Lean

Recover the Frechet gradient

Lean declarationBanditRL.OnlineConvex.singleton_subdifferential_hasGradientAt

Compiled

Plain-English statement. Two genuine supporting inequalities squeeze the derivative residual by a coefficient tending to zero.

Mathematical reading. Two genuine supporting inequalities squeeze the derivative residual by a coefficient tending to zero.
Intuition
Two genuine supporting inequalities squeeze the derivative residual by a coefficient tending to zero.
Why it is needed
Supports the singleton/gradient equivalence under the explicitly stated ambient real-germ interpretation. The source scope and differentiability gaps remain visible in the reader.
Place in the proof
Supporting lemma or endpoint for the separately specified library interpretation of Theorem 2.22; source scope and differentiability gaps remain explicit.
Proof and Lean reading notes
Proof idea
A nonzero supporting normal at a domain boundary would give a second support g+d, so a singleton forces ambient interior. Convex local Lipschitzness bounds every nearby support; genuine nonbottom-filter limits and finite-dimensional compactness identify the selected support limit. Two actual global inequalities bound the nonnegative remainder by norm(G(y)-g)*norm(y-x), yielding the Frechet derivative. Proof-internal choice is not an algorithm or computational oracle.
Lean reading notes
The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
BanditRL.OnlineConvex.singleton_subdifferential_interior, BanditRL.OnlineConvex.singleton_subgradient_tendsto
Exact Lean statement
theorem singleton_subdifferential_hasGradientAt (f : E → EReal) (hf : IsConvexExtended f) (x : E) (hx : ∃ r : ℝ, f x = (r : EReal)) (g : E) (hg : SourceSubdifferential f x = {g}) : HasGradientAt (fun y => (f y).toReal) g x
Mathematics ↔ Lean

Differentiability iff singleton subdifferential

Lean declarationBanditRL.OnlineConvex.theorem_2_22

Compiled

Plain-English statement. Convex extended-real f finite at x is differentiable iff the global subdifferential is a singleton.

Mathematical reading. Convex extended-real f finite at x is differentiable iff the global subdifferential is a singleton.
Intuition
Convex extended-real f finite at x is differentiable iff the global subdifferential is a singleton.
Why it is needed
Supports the singleton/gradient equivalence under the explicitly stated ambient real-germ interpretation. The source scope and differentiability gaps remain visible in the reader.
Place in the proof
Supporting lemma or endpoint for the separately specified library interpretation of Theorem 2.22; source scope and differentiability gaps remain explicit.
Proof and Lean reading notes
Proof idea
A real germ supplies finite-neighborhood affine CONTACT, hence global noBottom. Regularity and accepted Theorem2.7 produce actual global gradient support. A local minimum of the supported residual has derivative zero; Riesz injectivity gives uniqueness. Eventual equality of real representatives gives the same gradient. A nonzero supporting normal at a domain boundary would give a second support g+d, so a singleton forces ambient interior. Convex local Lipschitzness bounds every nearby support; genuine nonbottom-filter limits and finite-dimensional compactness identify the selected support limit. Two actual global inequalities bound the nonnegative remainder by norm(G(y)-g)*norm(y-x), yielding the Frechet derivative. Proof-internal choice is not an algorithm or computational oracle.
Lean reading notes
The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
BanditRL.OnlineConvex.singleton_subdifferential_hasGradientAt, BanditRL.OnlineConvex.theorem_2_22_gradient
Exact Lean statement
theorem theorem_2_22 (f : E → EReal) (hf : IsConvexExtended f) (x : E) (hx : ∃ r : ℝ, f x = (r : EReal)) : SourceDifferentiableAt f x ↔ ∃ g : E, SourceSubdifferential f x = {g}
Mathematics ↔ Lean

The singleton is the actual gradient

Lean declarationBanditRL.OnlineConvex.theorem_2_22_gradient

Compiled

Plain-English statement. SourceDifferentiableAt means a real differentiable representative h agrees with f throughout an AMBIENT neighborhood of x. It entails actual local finiteness, not merely smoothness of toReal or differentiation within the domain/affine span. The gradient identity holds for EVERY such representative.

Mathematical reading. SourceDifferentiableAt means a real differentiable representative h agrees with f throughout an AMBIENT neighborhood of x. It entails actual local finiteness, not merely smoothness of toReal or differentiation within the domain/affine span. The gradient identity holds for EVERY such representative.
Intuition
Every differentiable real representative agreeing with f near x has its gradient as the unique global subgradient.
Why it is needed
Supports the singleton/gradient equivalence under the explicitly stated ambient real-germ interpretation. The source scope and differentiability gaps remain visible in the reader.
Place in the proof
Supporting lemma or endpoint for the separately specified library interpretation of Theorem 2.22; source scope and differentiability gaps remain explicit.
Proof and Lean reading notes
Proof idea
A real germ supplies finite-neighborhood affine CONTACT, hence global noBottom. Regularity and accepted Theorem2.7 produce actual global gradient support. A local minimum of the supported residual has derivative zero; Riesz injectivity gives uniqueness. Eventual equality of real representatives gives the same gradient.
Lean reading notes
The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
BanditRL.OnlineConvex.affine_support_of_finite_neighborhood
Exact Lean statement
theorem theorem_2_22_gradient (f : E → EReal) (hf : IsConvexExtended f) (x : E) (hx : ∃ r : ℝ, f x = (r : EReal)) (h : E → ℝ) (he : (fun y => (h y : EReal)) =ᶠ[𝓝 x] f) (hd : DifferentiableAt ℝ h x) : SourceSubdifferential f x = {gradient h x}
Mathematics ↔ Lean

Translate the absolute-value kink

Lean declarationBanditRL.OnlineConvex.shifted_absolute_convex_differentiable_iff

Compiled

Plain-English statement. The real norm is convex, and affine translation preserves convexity. If x differs from c, the translated argument is nonzero, so the absolute-value derivative applies. A derivative at c would, after composition with t ↦ t+c at zero, give a derivative of |t| at zero, contradicting the standard absolute-value result.

Mathematical reading. The real norm is convex, and affine translation preserves convexity. If x differs from c, the translated argument is nonzero, so the absolute-value derivative applies. A derivative at c would, after composition with t ↦ t+c at zero, give a derivative of |t| at zero, contradicting the standard absolute-value result.
Intuition
Translation moves the unique kink to the chosen center.
Why it is needed
Derive exact differentiability criteria for the introductory convex loss examples.
Place in the proof
Francesco Orabona, Online Learning: A Modern Introduction Using Convex Optimization, arXiv:1912.13213v10 (21 June 2026), Section 2.2 opening paragraph, printed page 16 / PDF page 28. PDF SHA256 cef4edfa97a6e063e53e9c532717c50aa156e5bc782ea49f969b3385011a1b17.
Proof and Lean reading notes
Proof idea
The real norm is convex, and affine translation preserves convexity. If x differs from c, the translated argument is nonzero, so the absolute-value derivative applies. A derivative at c would, after composition with t ↦ t+c at zero, give a derivative of |t| at zero, contradicting the standard absolute-value result.
Lean reading notes
Every c and x are real. The convexity proof uses the real norm composed with an affine translation; off-center differentiation and the impossibility of differentiating abs at zero are Mathlib facts. The shift 10 is preserved as the source instance; arbitrary c and the exact iff are derived. The printed shift 10 is the instance c=10. The labelled formula is recovered by a=y·z. Arbitrary real centers and labels, abstract finite-dimensional real inner-product spaces, and the pointwise/global iff conclusions are explicit derived generalizations. Dimension zero and zero effective normals are included. All derivatives are ambient real Fréchet derivatives; a differentiable restriction to a tangent line or constrained set does not imply ambient differentiability. These three derived criteria cover the two introductory loss families. Chapter 2 and the whole book remain incomplete; the overlapping source inventory is not a proof-completion denominator. The source paragraph supplies examples without local proofs. Its label domain and nondifferentiability scope are not explicitly quantified; the precise whole-space classifications below are library results. The pinned source is unchanged.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem shifted_absolute_convex_differentiable_iff (c : ℝ) : ConvexOn ℝ Set.univ (fun x : ℝ => |x - c|) ∧ ∀ x : ℝ, DifferentiableAt ℝ (fun w : ℝ => |w - c|) x ↔ x ≠ c
Mathematics ↔ Lean

Read the hinge kink from its support segment

Lean declarationBanditRL.OnlineConvex.hinge_convex_differentiable_iff

Compiled

Plain-English statement. The hinge is the maximum of an affine function and zero, hence convex. At the unit margin its full subdifferential is the segment from 0 to −a. A singleton would force a=0, contradicting the unit margin. Off the margin, the support is a singleton. Apply the accepted ambient-real-germ equivalence and use the everywhere finite hinge as its real representative.

Mathematical reading. The hinge is the maximum of an affine function and zero, hence convex. At the unit margin its full subdifferential is the segment from 0 to −a. A singleton would force a=0, contradicting the unit margin. Off the margin, the support is a singleton. Apply the accepted ambient-real-germ equivalence and use the everywhere finite hinge as its real representative.
Intuition
Ambient differentiability fails exactly on the unit-margin hyperplane.
Why it is needed
Derive exact differentiability criteria for the introductory convex loss examples.
Place in the proof
Francesco Orabona, Online Learning: A Modern Introduction Using Convex Optimization, arXiv:1912.13213v10 (21 June 2026), Section 2.2 opening paragraph, printed page 16 / PDF page 28. PDF SHA256 cef4edfa97a6e063e53e9c532717c50aa156e5bc782ea49f969b3385011a1b17.
Proof and Lean reading notes
Proof idea
The hinge is the maximum of an affine function and zero, hence convex. At the unit margin its full subdifferential is the segment from 0 to −a. A singleton would force a=0, contradicting the unit margin. Off the margin, the support is a singleton. Apply the accepted ambient-real-germ equivalence and use the everywhere finite hinge as its real representative.
Lean reading notes
E is a finite-dimensional real inner-product space, a and x are arbitrary. The sourceHinge definition is the real hinge included into EReal. Its finite values allow the ambient real-germ predicate to return ordinary DifferentiableAt for the same real function. No nonzero normal or positive dimension is assumed. The full support equality and singleton equivalence are actually reused inside the proof. The printed shift 10 is the instance c=10. The labelled formula is recovered by a=y·z. Arbitrary real centers and labels, abstract finite-dimensional real inner-product spaces, and the pointwise/global iff conclusions are explicit derived generalizations. Dimension zero and zero effective normals are included. All derivatives are ambient real Fréchet derivatives; a differentiable restriction to a tangent line or constrained set does not imply ambient differentiability. These three derived criteria cover the two introductory loss families. Chapter 2 and the whole book remain incomplete; the overlapping source inventory is not a proof-completion denominator. The source paragraph supplies examples without local proofs. Its label domain and nondifferentiability scope are not explicitly quantified; the precise whole-space classifications below are library results. The pinned source is unchanged.
Teaching dependencies
BanditRL.OnlineConvex.affine_convex, BanditRL.OnlineConvex.convexExtended_coe_iff, BanditRL.OnlineConvex.theorem_2_22, BanditRL.OnlineConvex.example_2_27, BanditRL.OnlineConvex.sourceDifferentiableAt_regular
Exact Lean statement
theorem hinge_convex_differentiable_iff {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] (a : E) : ConvexOn ℝ Set.univ (fun x : E => max (1 - inner ℝ a x) 0) ∧ ∀ x : E, DifferentiableAt ℝ (fun w : E => max (1 - inner ℝ a w) 0) x ↔ inner ℝ a x ≠ 1
Mathematics ↔ Lean

Determine when the labelled hinge is smooth everywhere

Lean declarationBanditRL.OnlineConvex.labelled_hinge_convex_differentiable_iff

Compiled

Plain-English statement. Put a=y·z, so the labelled loss equals h_a. If a is nonzero, choose x=a/⟨a,a⟩; then ⟨a,x⟩=1 and the preceding criterion gives an ambient kink. If a=0, the loss is constantly 1. This proves the global iff, with zero and negative labels allowed.

Mathematical reading. Put a=y·z, so the labelled loss equals h_a. If a is nonzero, choose x=a/⟨a,a⟩; then ⟨a,x⟩=1 and the preceding criterion gives an ambient kink. If a=0, the loss is constantly 1. This proves the global iff, with zero and negative labels allowed.
Intuition
The effective normal controls whether any kink exists.
Why it is needed
Derive exact differentiability criteria for the introductory convex loss examples.
Place in the proof
Francesco Orabona, Online Learning: A Modern Introduction Using Convex Optimization, arXiv:1912.13213v10 (21 June 2026), Section 2.2 opening paragraph, printed page 16 / PDF page 28. PDF SHA256 cef4edfa97a6e063e53e9c532717c50aa156e5bc782ea49f969b3385011a1b17.
Proof and Lean reading notes
Proof idea
Put a=y·z, so the labelled loss equals h_a. If a is nonzero, choose x=a/⟨a,a⟩; then ⟨a,x⟩=1 and the preceding criterion gives an ambient kink. If a=0, the loss is constantly 1. This proves the global iff, with zero and negative labels allowed.
Lean reading notes
E is a finite-dimensional real inner-product space, y is any real label and z any feature vector. The effective normal is y • z. Zero label, zero feature, and zero dimension all give the constant 1 loss. The global Differentiable iff is separate from the all-points DifferentiableAt iff. The local source paragraph does not specify a label set. The printed shift 10 is the instance c=10. The labelled formula is recovered by a=y·z. Arbitrary real centers and labels, abstract finite-dimensional real inner-product spaces, and the pointwise/global iff conclusions are explicit derived generalizations. Dimension zero and zero effective normals are included. All derivatives are ambient real Fréchet derivatives; a differentiable restriction to a tangent line or constrained set does not imply ambient differentiability. These three derived criteria cover the two introductory loss families. Chapter 2 and the whole book remain incomplete; the overlapping source inventory is not a proof-completion denominator. The source paragraph supplies examples without local proofs. Its label domain and nondifferentiability scope are not explicitly quantified; the precise whole-space classifications below are library results. The pinned source is unchanged.
Teaching dependencies
BanditRL.OnlineConvex.hinge_convex_differentiable_iff
Exact Lean statement
theorem labelled_hinge_convex_differentiable_iff {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E] (y : ℝ) (z : E) : ConvexOn ℝ Set.univ (fun x : E => max (1 - y * inner ℝ z x) 0) ∧ (∀ x : E, DifferentiableAt ℝ (fun w : E => max (1 - y * inner ℝ z w) 0) x ↔ y * inner ℝ z x ≠ 1) ∧ (Differentiable ℝ (fun w : E => max (1 - y * inner ℝ z w) 0) ↔ y • z = 0)
Explore 1 additional Lean teaching notes
Mathematics ↔ Lean

Compactness identifies every support limit

Lean declarationBanditRL.OnlineConvex.singleton_subgradient_tendsto

Compiled

Plain-English statement. Nearby supports converge to the singleton element using the actual local uniform bound and closed-graph limit.

Mathematical reading. Nearby supports converge to the singleton element using the actual local uniform bound and closed-graph limit.
Intuition
Nearby supports converge to the singleton element using the actual local uniform bound and closed-graph limit.
Why it is needed
Supports the singleton/gradient equivalence under the explicitly stated ambient real-germ interpretation. The source scope and differentiability gaps remain visible in the reader.
Place in the proof
Supporting lemma or endpoint for the separately specified library interpretation of Theorem 2.22; source scope and differentiability gaps remain explicit.
Proof and Lean reading notes
Proof idea
Positive local ball bounds every actual nearby support; compact closedBall and unique global support limit on a NeBot filter produce convergence without assuming a gs limit.
Lean reading notes
The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.
Teaching dependencies
No direct teaching dependency recorded.
Exact Lean statement
theorem singleton_subgradient_tendsto {ι : Type*} (l : Filter ι) [NeBot l] (f : E → EReal) (hbot : ∀ y, f y ≠ ⊥) (hf : IsConvexExtended f) (x g : E) (hx : x ∈ interior (effectiveDomain f)) (hg : SourceSubdifferential f x = {g}) (xs gs : ι → E) (hxs : Tendsto xs l (𝓝 x)) (hs : ∀ᶠ i in l, gs i ∈ SourceSubdifferential f (xs i)) : Tendsto gs l (𝓝 g)

Maintainer contract

Open the canonical completion definition and blockers

Eleven theorems and one ambient-real-germ definition. Later source obligations, Chapter 2 and the whole book remain incomplete. Three additional derived theorems give exact differentiability criteria for the introductory absolute and hinge losses; five concrete canaries check their boundaries.

Remaining blockers

  • Later source obligations, Chapter 2 and the whole book remain incomplete.
  • The source defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage.

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 defines subgradients for proper functions, but Theorem 2.22 prints a wider codomain without reconciling that scope (G-T22-SCOPE). It does not define extended-valued differentiability in the inspected passage (G-T22-DIFF). The library therefore separately specifies a total support predicate and an ambient finite-real-germ interpretation; these are explicit interpretations, not definitions supplied by that passage. The eleven theorems use finite-dimensional real inner-product spaces; the germ definition itself omits finite dimension. No-bottom and ambient interior are derived in the terminal directions, while individual helpers retain their stated local-finiteness, Lipschitz, continuity and nonbottom-filter premises. The source gives no local proof; the construction below is the library proof. Later source obligations, Chapter 2 and the whole book remain incomplete.

All Lean modules in this chapter

Open the complete module list (2 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof.OnlineNonsmoothExamples33Compiled
BanditRLProof.OnlineSubgradientDifferentiability122Compiled