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

Teaching chapter 25 of 31 · Canonical route compiled

A convex function with uncountably many kinks

The real-plane function |x₁| is convex and ambient nondifferentiable along an uncountable closed 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 the unnumbered paragraph following Orabona Theorem 2.30.

Learning goals

  • Separate ambient differentiation from a differentiable restriction.
  • Use a horizontal curve to detect the absolute-value kink.
  • Transfer uncountability from [0,1] to the same-function nonsmooth locus.

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, 21 June 2026

Online Learning: A Modern Introduction Using Convex Optimization

Francesco Orabona

Location
Unnumbered counterexample after Theorem 2.30, immediately before Section 2.2.2
Pages
printed 19 / PDF 31
Open at the cited pages
proof flow · ordered flow

From a horizontal kink to an uncountable exceptional set

Read top to bottom to follow the argument or procedure.

  1. Pull back the convex absolute value

    The first-coordinate projection is linear. Convexity of the real norm and ConvexOn.comp_linearMap give global convexity of f; no local convexity assumption is added.

  2. Test a horizontal curve through the vertical axis

    At x₁=0, the differentiable curve c(t)=x+t(1,0) passes through x. If f had an ambient derivative at x, the chain rule would make f∘c differentiable at zero. But f(c(t))=|t|, contradicting not_differentiableAt_abs_zero.

  3. Place every segment point on that axis

    A member of the closed segment has nonnegative convex-combination weights adding to one. Its first coordinate is zero, so the preceding ambient obstruction applies, including at both endpoints.

  4. Transfer uncountability from a real interval

    The map φ(t)=(0,t) is injective by the second coordinate and sends [0,1] into S using weights (1−t,t). Countability of S would imply countability of its injective preimage and hence of [0,1], contradicting Cardinal.Real.Icc_countable_iff. Since S⊆N_f, Set.Countable.mono then rules out countability of N_f.

2 distinct theory routes, one frontier.Open the statement you want to compare; the other routes stay compact.
Source theorem · faithful restatementUnnumbered convex counterexample: the whole segmentBounded example declarationsprinted 19 / PDF 31, end of Section 2.2.1
Source theorem · faithful restatement

Unnumbered convex counterexample: the whole segment

Original at printed 19 / PDF 31, end of Section 2.2.1 ↗
Bounded example declarationsThis bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.

The fixed globally convex function has no ambient derivative at every point of the closed vertical segment.

Model
Fixed real Euclidean plane with ordinary set cardinality.
Assumptions
The fixed function f(x)=|x₁| is real-valued on all of the real Euclidean plane. Lean uses EuclideanSpace ℝ (Fin 2), with source x₁ represented by index 0. DifferentiableAt means the ambient real Fréchet derivative. The segment joins (0,0) to (0,1) and includes both endpoints. Countable means at most countable. Convexity, derivative failure and uncountability are conclusions proved by the library, not supplied premises.
Algorithm parameters
All points of the fixed closed segment; the axis helper allows every real second coordinate.
Regret notion
No probability, online algorithm or regret statement.
Guarantee
Global convexity and ambient nondifferentiability throughout S.
Source mathematical statement. The fixed globally convex function has no ambient derivative at every point of the closed vertical segment.

BanditRLlib relationship. Orabona states the convex example and its failure of differentiability along the segment without a proof. The three missing derivations—convexity, ambient nondifferentiability and the uncountability bridge—are supplied here by the library, not attributed to a printed argument. The helper proving failure on the entire vertical axis is explicitly stronger than the stated segment example.

Source theorem · faithful restatementUnnumbered counterexample: countability consequenceBounded example declarationsprinted 19 / PDF 31, end of Section 2.2.1
Source theorem · faithful restatement

Unnumbered counterexample: countability consequence

Original at printed 19 / PDF 31, end of Section 2.2.1 ↗
Bounded example declarationsThis bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.

The same function has uncountably many ambient nondifferentiability points, refuting a countable-exception interpretation of convex differentiability.

Model
Fixed real Euclidean plane with ordinary set cardinality.
Assumptions
The fixed function f(x)=|x₁| is real-valued on all of the real Euclidean plane. Lean uses EuclideanSpace ℝ (Fin 2), with source x₁ represented by index 0. DifferentiableAt means the ambient real Fréchet derivative. The segment joins (0,0) to (0,1) and includes both endpoints. Countable means at most countable. Convexity, derivative failure and uncountability are conclusions proved by the library, not supplied premises.
Algorithm parameters
All points of the fixed closed segment; the axis helper allows every real second coordinate.
Regret notion
No probability, online algorithm or regret statement.
Guarantee
The segment and therefore the same-function nonsmooth locus are not at most countable.
Source mathematical statement. The same function has uncountably many ambient nondifferentiability points, refuting a countable-exception interpretation of convex differentiability.

BanditRLlib relationship. Orabona states the convex example and its failure of differentiability along the segment without a proof. The three missing derivations—convexity, ambient nondifferentiability and the uncountability bridge—are supplied here by the library, not attributed to a printed argument. The helper proving failure on the entire vertical axis is explicitly stronger than the stated segment example.

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

Ambient nondifferentiability along the closed segment

Lean declarationBanditRL.OnlineConvex.convex_nondifferentiable_segment

Compiled

Plain-English statement. The fixed globally convex function has no ambient derivative at every point of the closed vertical segment.

Mathematical reading. The fixed globally convex function has no ambient derivative at every point of the closed vertical segment.
Intuition
A constant vertical restriction still has a horizontal kink.
Why it is needed
Global convexity and ambient nondifferentiability throughout S.
Place in the proof
Orabona v10, unnumbered paragraph after Theorem 2.30, printed 19 / PDF 31.
Proof and Lean reading notes
Proof idea
The first-coordinate projection is linear. Convexity of the real norm and ConvexOn.comp_linearMap give global convexity of f; no local convexity assumption is added. At x₁=0, the differentiable curve c(t)=x+t(1,0) passes through x. If f had an ambient derivative at x, the chain rule would make f∘c differentiable at zero. But f(c(t))=|t|, contradicting not_differentiableAt_abs_zero. A member of the closed segment has nonnegative convex-combination weights adding to one. Its first coordinate is zero, so the preceding ambient obstruction applies, including at both endpoints.
Lean reading notes
The fixed function f(x)=|x₁| is real-valued on all of the real Euclidean plane. Lean uses EuclideanSpace ℝ (Fin 2), with source x₁ represented by index 0. DifferentiableAt means the ambient real Fréchet derivative. The segment joins (0,0) to (0,1) and includes both endpoints. Countable means at most countable. Convexity, derivative failure and uncountability are conclusions proved by the library, not supplied premises. Orabona states the convex example and its failure of differentiability along the segment without a proof. The three missing derivations—convexity, ambient nondifferentiability and the uncountability bridge—are supplied here by the library, not attributed to a printed argument. The helper proving failure on the entire vertical axis is explicitly stronger than the stated segment example. This bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.
Teaching dependencies
BanditRL.OnlineConvex.coordinate_absolute_convex, BanditRL.OnlineConvex.coordinate_absolute_not_differentiable
Exact Lean statement
theorem convex_nondifferentiable_segment : ConvexOn ℝ Set.univ coordinateAbsolute ∧ ∀ x ∈ segment ℝ (0 : EuclideanSpace ℝ (Fin 2)) (PiLp.single 2 1 1), ¬ DifferentiableAt ℝ coordinateAbsolute x
Mathematics ↔ Lean

Uncountably many ambient nonsmooth points

Lean declarationBanditRL.OnlineConvex.convex_uncountable_nondifferentiability

Compiled

Plain-English statement. The same function has uncountably many ambient nondifferentiability points, refuting a countable-exception interpretation of convex differentiability.

Mathematical reading. The same function has uncountably many ambient nondifferentiability points, refuting a countable-exception interpretation of convex differentiability.
Intuition
The segment contains a copy of a nondegenerate real interval.
Why it is needed
The segment and therefore the same-function nonsmooth locus are not at most countable.
Place in the proof
Orabona v10, unnumbered paragraph after Theorem 2.30, printed 19 / PDF 31.
Proof and Lean reading notes
Proof idea
The map φ(t)=(0,t) is injective by the second coordinate and sends [0,1] into S using weights (1−t,t). Countability of S would imply countability of its injective preimage and hence of [0,1], contradicting Cardinal.Real.Icc_countable_iff. Since S⊆N_f, Set.Countable.mono then rules out countability of N_f.
Lean reading notes
The fixed function f(x)=|x₁| is real-valued on all of the real Euclidean plane. Lean uses EuclideanSpace ℝ (Fin 2), with source x₁ represented by index 0. DifferentiableAt means the ambient real Fréchet derivative. The segment joins (0,0) to (0,1) and includes both endpoints. Countable means at most countable. Convexity, derivative failure and uncountability are conclusions proved by the library, not supplied premises. Orabona states the convex example and its failure of differentiability along the segment without a proof. The three missing derivations—convexity, ambient nondifferentiability and the uncountability bridge—are supplied here by the library, not attributed to a printed argument. The helper proving failure on the entire vertical axis is explicitly stronger than the stated segment example. This bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.
Teaching dependencies
BanditRL.OnlineConvex.coordinate_segment_not_countable, BanditRL.OnlineConvex.coordinate_absolute_convex, BanditRL.OnlineConvex.convex_nondifferentiable_segment
Exact Lean statement
theorem convex_uncountable_nondifferentiability : ConvexOn ℝ Set.univ coordinateAbsolute ∧ ¬ ({x : EuclideanSpace ℝ (Fin 2) | ¬ DifferentiableAt ℝ coordinateAbsolute x}).Countable

Maintainer contract

Open the canonical completion definition and blockers

One fixed source example and its countability consequence: five theorems and one function definition. This bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.

Remaining blockers

  • This bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.

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

  • Orabona states the convex example and its failure of differentiability along the segment without a proof. The three missing derivations—convexity, ambient nondifferentiability and the uncountability bridge—are supplied here by the library, not attributed to a printed argument. The helper proving failure on the entire vertical axis is explicitly stronger than the stated segment example.
  • This bounded example does not complete Chapter 2 or the book. Exact nonsmooth-locus equality, exact continuum cardinality and a general almost-everywhere differentiability theorem are outside this package.

All Lean modules in this chapter

Open the complete module list (2 modules)
ModuleDeclarationsProject importsStatus
BanditRLProof.OnlineConvexNondifferentiability40Compiled
BanditRLProof.OnlineConvexUncountability21Compiled