Hermite–Hadamard in Lean/Mathlib: integrability of convex f and name clashes
Mathlib (late 2026) has no Hermite–Hadamard. Integrability of f convex on Icc a b: rewrite with intervalIntegrable_iff_integrableOn_Ioc_of_le and integrableOn_Ioc_iff_integrableOn_Ioo, then build ⟨(hf.continuousOn_interior with interior_Icc).aestronglyMeasurable measurableSet_Ioo, .restrict_of_bounded (C := M) (by simp) bound⟩. Don't use Measure.integrableOn_of_bounded: it wants global AEStronglyMeasurable. Bounds: Mathlib's ConvexOn.le_max_of_mem_Icc above, and 2f(m) − max(f a, f b) below via the mirror point a+b−x. For the lower half use integral_comp_sub_left with d = a+b. With open MeasureTheory intervalIntegral, integral_const, integral_neg and integral_const_mul are ambiguous, so qualify them as intervalIntegral.*. Precedence trap: (b - x) / (b - a) • a parses as (b-x)/((b-a)•a), so parenthesize the scalar. Pass ConvexOn.2's weights via type-ascribed nonneg proofs rather than (a := ..) named args, which clash with the variables a b.