Documentation

CslibFrontier.Foundations.Data.Nat.SqrtLog.LowerBound

Rescaling square-root-logarithm lower bounds #

A natural-number bound at lengths d * n transfers to the usual real-valued N * √(log₂ N) scale. If n ≥ max d 512, then √(log₂ (d * n)) is at most twice Nat.sqrt (Nat.log 2 n). Consequently, a strict lower bound n * Nat.sqrt (Nat.log 2 (n + 2)) / K < f (d * n) implies the real lower bound (d * n) * √(log₂ (d * n)) / (2 * K * d) < f (d * n).

The strict inequality removes the rounding loss: for natural numbers, a / K < v is equivalent to a < v * K when K > 0. The infinitely-often version keeps the coefficient 1 / (2 * K * d) explicit. In particular, the budget K = 12 * (A + 1) gives the coefficient 1 / (24 * (A + 1) * d).

Main results #

theorem Nat.sqrt_logb_mul_le_two_mul_sqrt_log_two {d n : ℕ} (hd : 0 < d) (hdn : d ≤ n) (hn : 512 ≤ n) :
√(Real.logb 2 ↑(d * n)) ≤ 2 * ↑(log 2 n).sqrt

For n ≥ max d 512, rescaling the argument by d and removing both floors costs at most a factor of two in the square-root logarithm.

theorem Nat.mul_sqrt_logb_div_lt_of_div_lt {K d n v : ℕ} (hK : 0 < K) (hd : 0 < d) (hdn : d ≤ n) (hn : 512 ≤ n) (h : n * (log 2 (n + 2)).sqrt / K < v) :
↑(d * n) * √(Real.logb 2 ↑(d * n)) / (2 * ↑K * ↑d) < ↑v

A strict natural-number lower bound at a rescaled length implies a real N * √(log₂ N) lower bound, with the coefficient 1 / (2 * K * d).

theorem Nat.frequently_mul_sqrt_logb_div_lt {f : ℕ → ℕ} {K d : ℕ} (hK : 0 < K) (hd : 0 < d) (h : ∃ᶠ (n : ℕ) in Filter.atTop, n * (log 2 (n + 2)).sqrt / K < f (d * n)) :
∃ᶠ (N : ℕ) in Filter.atTop, ↑N * √(Real.logb 2 ↑N) / (2 * ↑K * ↑d) < ↑(f N)

Infinitely many strict natural-number lower bounds at lengths d * n yield infinitely many real square-root-logarithm lower bounds with an explicit coefficient.