Documentation

CslibFrontier.Foundations.Analysis.SpecialFunctions.LogTwoPow

Natural logarithms below powers of two #

Parameter calculations that keep their quantities as powers of two need log x ≤ k once x ≤ 2 ^ k: the natural logarithm of 2 ^ k is k log 2, and log 2 ≤ 1.

Main results #

log 2 < 1, since log x < x - 1 for x ≠ 1. Unlike Real.log_two_lt_d9, it needs only Mathlib.Analysis.SpecialFunctions.Log.Basic.

theorem Real.log_le_of_le_two_pow {x : ℝ} {k : ℕ} (hx : 0 < x) (hxk : x ≤ 2 ^ k) :
log x ≤ ↑k

The natural logarithm of a positive x ≤ 2 ^ k is at most k, since log 2 ≤ 1.