Ported for Lean Pool: imports relocated and code adapted to Lean/Mathlib v4.34.0.
First-order differentiability almost everywhere on source cubes #
This file supplies the first-differentiability-a.e. input used by the source upper-contact
estimate. The proof is the standard route: convexity on the open cube gives local Lipschitz
regularity; compactness of the closed unit cube upgrades this to a global Lipschitz bound on a
compact neighborhood of Q_1; Rademacher then gives differentiability almost everywhere on
Q_1.
A convex function on the source cube is locally Lipschitz on Q_3.
Convexity on Q_3 gives a global Lipschitz bound on the closed unit cube.
Convexity on Q_3 gives a global Lipschitz bound on Q_1.
Convex functions on the source cube are differentiable almost everywhere on Q_1.
The non-first-differentiability set in Q_1 is null for convex functions on Q_3.