NLA-lib Explorer

Real.log_one_add_le_sub_sq_div

Library · theorem

For s \ge 0, \log(1 + s) \le s - \frac{s^2}{2(1 + s)} \,, valid at every s \ge 0, unlike the cubic Real.log_one_add_le_cubic, whose bound is useless for large s. The difference has derivative s^2/(2(1 + s)^2) \ge 0. It gives the upper tail exponent s - \log(1 + s) \ge s^2/(2(1 + s)) \ge \min(s^2, s)/4 of a \chi^2 variable.

Real.log_one_add_le_sub_sq_div {s : ℝ} (hs : 0 ≤ s) : Real.log (1 + s) ≤ s - s ^ 2 / (2 * (1 + s))

Full source on GitHub

Import NLAlib.ForMathlib.Analysis.SpecialFunctions.Log.Deriv.