subadditive_f_weight_mul_log
Sanity: for the Shannon generator f(x) = x log x, the weight is g(x) = x² · (1/x) = x for x > 0.
Statement
theorem subadditive_f_weight_mul_log {x : ℝ} (hx : 0 < x) : subadditive_f_weight (fun y => y * Real.log y) x = x
- Source
- sanity lemma for subadditive_f_weight
- Verified
- 23 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- subadditive_f_weightThe weight g(x) = x² f''(x) attached to a generator f in Theorem 1 of arXiv:2610.21231 (f'' is the iterated derivative
deriv (deriv f)).
- subadditive_f_weightThe weight g(x) = x² f''(x) attached to a generator f in Theorem 1 of arXiv:2610.21231 (f'' is the iterated derivative
The proof, explained
The weight of the Shannon generator f(y) = y log y is defined as g(x) = x² f''(x). The proof first shows that f'(y) = log y + 1 for all y in a neighborhood of x > 0. Differentiating this expression gives the second derivative f''(x) = x⁻¹. Finally, substituting f''(x) = x⁻¹ into the definition and clearing the denominator yields x² · x⁻¹ = x.
In a neighborhood of x, the derivative of y ↦ y log y is log y + 1.
Since x > 0, the open ray (0, ∞) is a neighborhood of x by lt_mem_nhds. For any y in this neighborhood, y > 0 implies y ≠ 0 by ne_of_gt, so Real.hasDerivAt_mul_log applies to show the derivative of y ↦ y log y at y is log y + 1.
uses
lt_mem_nhds,ne_of_gt,Real.hasDerivAt_mul_loghave heq : deriv (fun y => y * Real.log y) =ᶠ[nhds x] fun y => Real.log y + 1 := by filter_upwards [lt_mem_nhds hx] with y hy exact (Real.hasDerivAt_mul_log (ne_of_gt hy)).deriv
The second derivative of y ↦ y log y at x is x⁻¹.
Since x > 0 implies x ≠ 0 by ne_of_gt, Real.hasDerivAt_log shows that log has derivative x⁻¹ at x. Adding the constant 1 does not change the derivative (via add_const). Because the first derivative of y ↦ y log y agrees with log y + 1 in a neighborhood of x (established in the previous step), congr_of_eventuallyEq implies that it also has derivative x⁻¹ at x.
uses
Real.hasDerivAt_log,ne_of_gt,add_const,congr_of_eventuallyEqhave h2 : HasDerivAt (deriv (fun y => y * Real.log y)) x⁻¹ x := (((Real.hasDerivAt_log (ne_of_gt hx)).add_const 1).congr_of_eventuallyEq heq)
The subadditive weight of y ↦ y log y at x equals x.
Unfolding the definition of subadditive_f_weight gives x² times the second derivative of y ↦ y log y at x. Substituting the second derivative x⁻¹ (from h2) turns the expression into x² * x⁻¹. Field simplification then cancels the factor of x to conclude that x² * x⁻¹ = x, using x > 0 to know x ≠ 0.
unfold subadditive_f_weight rw [h2.deriv] field_simp
lt_mem_nhds- If a < b in an ordered topological space, then the interval (a, ∞) is a neighborhood of b.
ne_of_gt- If b < a, then a ≠ b.
Real.hasDerivAt_mul_log- For any non-zero real number x, the function y ↦ y * log y has derivative log x + 1 at x.
Real.hasDerivAt_log- For any non-zero real number x, the natural logarithm has derivative x⁻¹ at x.
add_const- Adding a constant to a differentiable function preserves its derivative.
congr_of_eventuallyEq- If two functions agree in a neighborhood of a point, their derivatives at that point coincide.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
theorem subadditive_f_weight_mul_log {x : ℝ} (hx : 0 < x) : subadditive_f_weight (fun y => y * Real.log y) x = x := by have heq : deriv (fun y => y * Real.log y) =ᶠ[nhds x] fun y => Real.log y + 1 := by filter_upwards [lt_mem_nhds hx] with y hy exact (Real.hasDerivAt_mul_log (ne_of_gt hy)).deriv have h2 : HasDerivAt (deriv (fun y => y * Real.log y)) x⁻¹ x := (((Real.hasDerivAt_log (ne_of_gt hx)).add_const 1).congr_of_eventuallyEq heq) unfold subadditive_f_weight rw [h2.deriv] field_simp