The scale n / √(log n) #
Natural-number estimates for the scale n / Nat.sqrt (Nat.log 2 n), that is ⌊n / ⌊√⌊log₂ n⌋⌋⌋,
in which the deterministic simulations of nondeterministic and probabilistic time by blocking and
tensor contraction are stated (#1833). From n = 2 on the divisor is positive
(Nat.one_le_sqrt_log_two), and so is the scale (Nat.one_le_div_sqrt_log_two).
The scale dominates the logarithm (Nat.log_two_le_div_sqrt_log_two), hence every polynomial in
the exponent, and the number ⌈n / ⌈log₂ (n + 2)⌉⌉ of time blocks of length ⌈log₂ (n + 2)⌉
(Nat.ceilDiv_clog_two_le). Scaling n by a constant scales it by at most that constant, up to
an additive constant (Nat.mul_div_sqrt_log_two_le). The scale is not monotone, since the divisor
jumps, but it is monotone up to constants (Nat.div_sqrt_log_two_le_of_le), so a bound in a
smaller size, such as the number of edges of a network, transfers to the clock. Together these
give the exponent arithmetic of the simulation: for t = c * T, with q = ⌈t / ⌈log₂ (t + 2)⌉⌉
blocks, the cost 3 ^ (K * q) * (t + 1) ^ d * 2 ^ (e * t / √⌊log₂ t⌋) of enumerating the movement
schedules, building the networks and contracting them is 2 ^ O(T / √⌊log₂ T⌋)
(Nat.exists_three_pow_mul_le_two_pow_div_sqrt_log_two).
The floors cost only constant factors: the natural scale is between the real scale
n / √(log₂ n) minus one and three times it, which is checked in the test suite.
Main results #
Nat.log_two_le_div_sqrt_log_two:⌊log₂ n⌋ ≤ n / √⌊log₂ n⌋.Nat.sqrt_log_two_le_sqrt_clog_two_sub_one_add_one:⌊√⌊log₂ n⌋⌋ ≤ ⌊√(⌈log₂ n⌉ - 1)⌋ + 1, which is⌈√⌈log₂ n⌉⌉forn ≥ 2.Nat.ceilDiv_clog_two_le:⌈n / ⌈log₂ (n + 2)⌉⌉ ≤ n / √⌊log₂ n⌋ + 1.Nat.mul_div_sqrt_log_two_le: the scale ofc * nis at mostctimes that ofn, plusc.Nat.div_sqrt_log_two_le_of_le: the scale is monotone up to constants.Nat.exists_three_pow_mul_le_two_pow_div_sqrt_log_two: the cost of the counting simulation.Nat.mul_two_pow_add_le_two_pow,Nat.mul_two_pow_div_sqrt_log_two_add_le,Nat.mul_add_one_pow_add_le_pow: absorbing constants into exponential and polynomial bounds.
⌊√⌊log₂ n⌋⌋ ≤ ⌊√(⌈log₂ n⌉ - 1)⌋ + 1, with truncated subtraction. The right-hand side is
⌈√⌈log₂ n⌉⌉ for n ≥ 2 and is 1 for n ≤ 1, so from n = 2 on the divisor of the scale is
at most the ceiling convention for the square root of the ceiling logarithm.
The scale is monotone up to constants: m ≤ n gives
m / √⌊log₂ m⌋ ≤ 2 * (n / √⌊log₂ n⌋) + 2. When the divisors are within a factor 2 of each other
this is division by the smaller divisor; otherwise m is so much smaller than n that
m * √⌊log₂ n⌋ ≤ n.
The cost of the counting simulation is 2 ^ O(T / √(log T)) (#1833). For t = c * T,
time blocks of length b = ⌈log₂ (t + 2)⌉ and q = ⌈t / b⌉ blocks, the number 3 ^ (K * q) of
movement schedules of K heads, a polynomial (t + 1) ^ d and a contraction cost
2 ^ (e * t / √⌊log₂ t⌋) multiply to at most 2 ^ (C * T / √⌊log₂ T⌋) from T = 2 on, for a
constant C depending only on K, c, d and e.