Documentation

Mathlib.Analysis.SpecialFunctions.Log.NegMulLog

The function x ↦ - x * log x #

The purpose of this file is to record basic analytic properties of the function x ↦ - x * log x, which is notably used in the theory of Shannon entropy.

Main definitions #

theorem Real.Continuous.mul_log {α : Type u_1} [TopologicalSpace α] {f : α} (hf : Continuous f) :
Continuous fun (a : α) => f a * Real.log (f a)
theorem Real.deriv_mul_log {x : } (hx : x 0) :
deriv (fun (x : ) => x * Real.log x) x = Real.log x + 1
theorem Real.hasDerivAt_mul_log {x : } (hx : x 0) :
HasDerivAt (fun (x : ) => x * Real.log x) (Real.log x + 1) x

At x=0, (fun x ↦ x * log x) is not differentiable (but note that it is continuous, see continuous_mul_log).

theorem Real.deriv_mul_log_zero :
deriv (fun (x : ) => x * Real.log x) 0 = 0

Not differentiable, hence deriv has junk value zero.

theorem Real.deriv2_mul_log (x : ) :
deriv^[2] (fun (x : ) => x * Real.log x) x = x⁻¹
theorem Real.mul_log_nonneg {x : } (hx : 1 x) :
0 x * Real.log x
theorem Real.mul_log_nonpos {x : } (hx₀ : 0 x) (hx₁ : x 1) :
x * Real.log x 0
noncomputable def Real.negMulLog (x : ) :

The function x ↦ - x * log x from to .

Equations
Instances For
    theorem Real.negMulLog_nonneg {x : } (h1 : 0 x) (h2 : x 1) :
    0 x.negMulLog
    theorem Real.negMulLog_mul (x y : ) :
    (x * y).negMulLog = y * x.negMulLog + x * y.negMulLog